You should always strive to do as little work as possible to get the most amount of results. Optimizing your site to make fast is no different. Why spend hours optimizing just to shave off a few milliseconds when you can do a few clicks and easily speed up the site by 20%. There’s no magic to our method. It’s plain, simple and obvious. Once you implement it, you’ll ask yourself “why didn’t I do this sooner.”
Long story short – upgrade to PHP7. Now!
Numerous tests show that PHP7 is 20% faster than PHP5 in real-life production environments. On generic tests, it can be 200% faster. It is also more secure, has new useful features and is recommended by WordPress. So, how to upgrade?
If you’re using a decent hosting company, you’re already on PHP7 so check your version before going further. Either grab the My WordPress Health Check plugin or upload a file with the phpinfo() function. Already on PHP7? Superb! You’re done. Using PHP5? Let’s get rid of it.
Login to your cPanel. If you don’t have a link handy just add “:2083” at the end of your domain name, i.e.,
http://www.mydomain.com:2083. Once you’re in, look for an icon that says “PHP Selector”, “Select PHP Version” or “PHP Version Manager” in the “Software” section. Click the icon to open the PHP version selector. Depending on what your hosting company has enabled you’ll either be able to select the PHP version for the whole account, for specific domains or on a per-folder level. Whichever situation is enabled in your cPanel make sure you choose v7.0 or v7.1 for your WordPress installation. Click “Save”. Refresh your site to verify the change is active and enjoy the speed up.
But … (insert your excuse here)
If you haven’t upgraded already, you surely have a “good” reason for it. No offense, but no, you don’t! Let us bust those excuses you have.
Sounds like a lot of work and server-related stuff I don’t understand
Yes, it’s server related, but if you know how to log in into cPanel, you have all the necessary skills. It’s as much work as creating a new email address in cPanel. Find the icon; click; select a new version from dropdown; save. Done.
If you’re not comfortable doing that, which is fine, open a support ticket with your hosting company, and they’ll do it for you.
My hosting company doesn’t support PHP7
That’s a huge issue! Huge! That fact by itself may not be that concerning, but it has numerous other consequences. It means you are using an outdated server software and that your hosting company simply isn’t doing its job. At the moment you’re paying the price of having a slow site, but soon when things start falling apart because they’re not maintaining servers, you’ll be dealing with serious downtime.
Send them an email and demand that they immediately migrate your account to a new server that supports PHP7. If they don’t do it (for whatever reason), you have to find a new hosting company. You’re scared and don’t want to do it? It’s okay to be anxious about migrations, but you don’t have to do it yourself.
Decent hosting companies will do the migration for you. Seriously, it’s not a marketing trick. You give them your old cPanel password, and that’s it.
I’ve heard WordPress doesn’t work with PHP7
Seriously!? WordPress explicitly notes PHP7 or greater as its server requirement. So, long story short – it works.
PHP7 is new and experimental
PHP v7.0 came out in December 2015. That’s hardly “new.” It’s a tried and tested piece of software that’s better than PHP5. It’s faster, has more features, and it’s simply the future. If that’s not enough for you bare in mind PHP5 is no longer actively maintained.
- It's easy to change the number of posts displayed on your homepage
- Speed up Your Website [Infographic]
- Improve WordPress speed by modifying browser caching
- How to remove query strings from static resources in WordPress and speed up your site