List of Plesk Resources
There is a lot of help available for Plesk which comes to you straight from the developers. A few years ago all we had was the Parallels Forums – that’s changed dramatically and if anything will only increase in the future. Here’s a list of sources I know to check for free support and updates on the latest Plesk developments: Plesk Forums: http://forum.parallels.com/forumdisplay.php?479-Parallels-Panel-Discussion Google+ Open Community: https://plus.google.com/communities/109881979300958500728 Uservoice for suggestions:...
read moreHow to style block quotes in P2
I’ve just snazzed up the blockquotes styling on a couple of my P2 sites and thought I’d share the code that did it. Here’s an example of the final result in P2: This is a block quote. You can create one by adding blockquote tags to the beginning and end of a block of text you’d like to look a little different. It doesn’t always have to be a quote, just something you’d like to give a little emphasis to. This is a little plain in the original P2 and I thought it deserved a bit of styling. Here’s what...
read moreHow to run PHP from the command line in Linux
Did you know that you can run PHP directly from the command line? Here’s how: Running a command Let’s run a one-liner and see the output displayed in our console. We’ll use phpinfo() because we know it should generate a lot of text. We need to start our line with php, use the -r switch and specify our command in single quotes: php -r 'phpinfo();' That’s it. You should see a familiar long list of set variables and info about your PHP environment. Note that you have to specify the semicolon inside your...
read moreHow to fix yum update failure blaming “qpid-cpp”
I’ve just tried to update one of my CentOS 6.2 servers that was built from an older AMI, only to find that the yum update command stopped unexpectedly with several dependency errors. They all pointed to something called “qpid”, and I must admit that I’ve never heard of it – nor did I know that it was installed. The long list ended with the following suggestion: You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest And why not indeed, since yum is so nice...
read moreHow to display wired clients on an Apple AirPort Time Capsule
Version 6.x of Apple’s AirPort Utility displays all your wireless client’s IP addresses, but it doesn’t show you wired devices. The old version 5.6 did, but without a hack it no longer runs on Mountain Lion. There is however a simple way to display all clients using the command line tool arp. Open up a Terminal Window (Applications – Utilities – Terminal) and type the following: arp -a ? (10.0.1.1) at 88:1f:a1:2c:87:37 on en1 ifscope [ethernet] ? (10.0.1.2) at bc:52:b7:1a:f2:9 on en1 ifscope [ethernet] ?...
read moreWordPress Multisite: a Brief Guided Tour
Installing WordPress Multisite isn’t the hard part – it’s getting your head around how to use it, especially if you’ve mostly been using single installs. In this quick tour I want to give you some pointers on how to use your new installation, and how it differs from single WordPress installations. New Role: The Super Admin On a single installation, the Administrator was the “master of your domain”. In a Multisite installation however he no longer has the powers that he once had. Instead, the Super Admin is...
read moreHow to setup WordPress as a Multisite Network (formerly known as WPMU)
Installing WordPress Multisite can give your site the benefit of being part of a network. I use this feature to spawn multiple installations that live on the same domain. It makes my life so much easier to update several WordPress instances at once. It’s also a great way of being logged into several individual sites at the same time. WordPress Multisite isn’t for everybody, and not every hosting company will allow you to install or use it. It will however work with most hosting packages that support a standard WordPress...
read moreHow to create a Cron Job in WordPress: Teach your plugin to do something automatically
Creating a recurring automatic function in WordPress used to be one of the most difficult things for me to understand. Several articles out there explain how to do it, yet I always forgot the concepts when the next cron job job came along. Right now it’s in my head, and that’s the time when I like to write things down for “next time”. I hope these notes will help you in your own development. Setting up a Cron Job in WordPress involves the following items: a scheduled event, i.e. something that WordPress will execute...
read moreHow to send an email in PHP
Many complex things are extremely simple in PHP – sending mail is one of them. Here’s how: // components for our email $recepients = 'you@somewhere.com'; $subject = 'Hello from PHP'; $message = 'This is a test mail.'; // let's send it $success = mail($recepients, $subject, $message); if ($success) { echo 'Mail added to outbox'; } else { echo 'That did not work so well'; } The mail function will add the message to the out queue, so the test will not show if the message has...
read moreHow to test if a Shell Command can be executed in PHP
Before we execute a shell command from PHP it’s a good idea to test if the server will respond to it. We can do this by making use of the empty() function. The following example consists of a helper function you can call before executing the command in question. Then we call it with the shell command we intend to use, before executing the command for real. We’re using ‘uname -a’ here as an example that will generate output and takes a parameter: // helper function function checkShellCommand($command) { $returnValue =...
read more