Blog

Introducing Child Theme Wizard for WordPress

Posted by on 12:17 am in Knowledge Base, Plugins | Comments Off on Introducing Child Theme Wizard for WordPress

I’ve just finished writing a new WordPress Plugin to help you create Child Themes with a single click, and no need for any external tools. The Child Theme Wizard is a super slim assistant which can be accessed under Tools – Child Theme Wizard. Pick a Parent Theme, enter additional information, click Create Child Theme and you’re all set! Child Theme Wizard in action   If all goes well you’ll see this   In case something went wrong Child Theme Wizard allows you to enter the following details: Theme Name...

read more

How to add elements to an array in PHP

Posted by on 9:23 pm in Knowledge Base | Comments Off on How to add elements to an array in PHP

It’s extremely easy to add elements to an existing array in PHP – so easy in fact that I regularly forget how to do it! I’m used to initialising and setting up my variables from Objective C, but PHP is so much easier and deals with it on the fly. Here we do it – ideal for loops: // create the array $myArray = array(); // add three elements to it $myArray[] = 'Hello'; $myArray[] = 'I must'; $myArray[] = 'be going'; // loop through all elements foreach ($myArray as $item) { echo $item; }...

read more

How to test if your theme is a Child Theme

Posted by on 9:02 pm in Knowledge Base | Comments Off on How to test if your theme is a Child Theme

You may need to know which of your themes are child themes, or in fact if the current theme you’re using is a parent or a child theme. Here’s how you can test both options. The following code snippet will iterate through all themes that are currently installed and displays the title and if it is a child theme or not: $allThemes = wp_get_themes(); echo '<ol>'; foreach ($allThemes as $theme) { echo '<li>'; // print the theme title echo $theme->get('Name'); // determine whether it's a...

read more

Handy Cheat Sheet for PHP File Operations thanks…

Posted by on 8:28 pm in Knowledge Base | Comments Off on Handy Cheat Sheet for PHP File Operations thanks…

Handy Cheat Sheet for PHP File Operations – thanks to @davidwalshblog http://davidwalsh.name/basic-php-file-handling-create-open-read-write-append-close-delete

read more

How to install WordPress in Plesk 11.5

Posted by on 1:05 pm in Knowledge Base | Comments Off on How to install WordPress in Plesk 11.5

In this video I will show you the two ways of installing WordPress in Plesk 11.5: the “one-click” way and the “custom installer” way. Both options have their advantages: the first offers extremely fast deployment, and the other offers very fine grained control, all courtesy of the WordPress APS package. This screencast was inspired by a the on the Parallels Forum: http://forum.parallels.com/showthread.php?297448-Install-Wordpress-with-Plesk   If you have any questions, feel free to leave a comment below, or add it...

read more

How to allow passive FTP connections in Plesk on Amazon EC2

Posted by on 2:29 am in Knowledge Base | Comments Off on How to allow passive FTP connections in Plesk on Amazon EC2

Passive FTP connections should work out of the box in Plesk. If no other firewall or NAT is interfering with it. I’ve recently noticed that when I install Plesk on Amazon EC2 every passive FTP connection fails with an error such as “Server sent passive reply with unroutable address. Passive mode failed.” The reason for this mishap is twofold: EC2 instances are behind a NAT, and therefore have an internal (unroutable) IP, and an external (public) IP. When a passive connection request comes in, ProFTP – Plesk’s...

read more

The Postfix Cheat Sheet

Posted by on 6:52 pm in Knowledge Base | Comments Off on The Postfix Cheat Sheet

I recently had some trouble with my postfix mail service. Not knowing where to being looking for log files and restart commands, I thought this quick cheat sheet would come in handy in the future: Starting and Stopping On CentOS we can speak to postfix like this: postfix start postfix stop postfix reload The this command re-reads the configuration files. Note that there is no restart command – you have to stop and then start the service again manually. Log Files On CentOS 6.5 I could find the log files in /var/log/maillog (that’s...

read more

How to extend instance storage on Amazon EC2

Posted by on 3:20 pm in Knowledge Base | Comments Off on How to extend instance storage on Amazon EC2

I’ve just launched an EC2 instance from my own AMI. This time however I wanted it to have more storage so I increased the size of my disk space from 10 to 100GB. Once the instance had launched I’ve noticed that – as before – only 10GB was actually available. I’ve had this with other infrastructure before, and I knew that I had to extend the volume as well as the volume and the file system for the OS to recognise the extra space. df -h Filesystem Size Used Avail Use% Mounted on /dev/xvde1 9.9G 2.6G 6.9G 27% /...

read more

How to use Bind Mounting in Linux

Posted by on 4:05 am in Knowledge Base | Comments Off on How to use Bind Mounting in Linux

Bind Mounting allows us to make one directory accessible from more than one location. It’s like “intercepting” directory1 and making the system redirect requests to directory2. Let’s take a look how to set this up and why we may want to use this technique. Quick Refresher: Device Mounting Perhaps you’re familiar with mounting devices to the filesystem in Linux. Say you had a new USB stick or other volume available and you want to make this accessible to your filesystem. Here’s how you’d do that: mount...

read more

How to change the default directory for backups in Plesk

Posted by on 5:01 pm in Knowledge Base | Comments Off on How to change the default directory for backups in Plesk

By default the Backup Manager in Plesk stores local backups in /var/lib/psa/dumps. You can change this location by editing /etc/psa/psa.conf. Find the following block in the file: # Backups directory DUMP_D /var/lib/psa/dumps DUMP_TMP_D /tmp Change the path for DUMP_D to your new desired location, then restart Plesk for the changes to take effect: service psa stopall service psa restart Alternatively, if you don’t want to make the change, you can mount another volume to the default backup directory (such as an Amazon S3 Bucket).

read more