PHP 7 offers one of the biggest jumps in performance we’ve seen so far from this particular software. If your web server is still running a previous version, you may be holding your site back from working as well as it could. The only problem is that learning how to upgrade WordPress to PHP 7 can be a little tricky.Despite that, upgrading your site to the latest version of PHP is a smart move, and one that will benefit you in a number of ways. Plus, the process isn’t actually that difficult as long as you go about it safely, to ensure that the update won’t break any of your site’s elements. That way, you won’t have to rush around fixing things afterward.In this article, we’re going to talk about what is and why you should make the switch. Then we’ll teach you how to upgrade WordPress to PHP 7 safely, in just four steps. Let’s get to it!
How PHP 7 can benefit your siteIn a lot of cases, people put off upgrading to the latest versions of the software they use because they don’t know a new version is available, or they don’t realize how much of an improvement it is. That’s why so many users still aren’t running PHP 7, despite its tangible benefits.PHP 7 offers some massive upgrades for end users. For example:. You should see about a 50% performance increase after making the switch. PHP 7 offers that’s well worth the upgrade. It supports 64-bit Windows systems. Most people use Linux for their servers, but if you’re a Windows user, you’ll appreciate the new support for.Plus, PHP 7 is now the official.If your primary concern is that installing PHP 7 will break your site in some way, then we’ve got your back.
Unless you're a web developer, you probably aren't aware of the fact that your WordPress website is using PHP. However, if you want to improve your site's security and performance, it's a good idea to familiarize yourself with PHP and learn how to check your WordPress site’s PHP Version. My host just changed to PHP 7.2, I switched one of my sites and found that WordPress was not working. Luckily the fix was a simple PHP permission change for mysqli. Simply make the change in.
There’s always some risk involved in an upgrade like this, but there are also ways to carry out the process safely. How to safely upgrade WordPress to PHP 7 (in four steps)Before we go any further, let’s talk about how the upgrading process works. If you have full privileges on your server, you can upgrade WordPress to PHP 7. On the other hand, if you’re on shared or, you’ll probably have to ask your provider’s support team to upgrade your site manually.In either case, the actual process is straightforward. The problem is that if you don’t take any precautionary measures, you run the risk of breaking elements of your site that don’t play nicely with PHP 7.
That’s why we’re partial to a different approach that enables you to eliminate most of the risk involved. Step #1: Back up your websiteregularly is something you probably already do.
However, you’ll want to have a backup of your site that’s as recent as possible.You’ll be using this backup to create a copy of your site, where you can test how everything works with PHP 7 without causing any damage to your live site. If a plugin ceases to work, for example, you’ll know you have to look for an alternative before you upgrade your real WordPress site to PHP 7.For this step, we recommend using the plugin, since it’s one of the most straightforward backup solutions available. It now, and then go to the Settings → UpdraftPlus Backups tab:Once you’re in, click on the Backup Now button, and choose to include both your database and files in your backup:Give the plugin a couple of minutes to back up your site, or possibly more (depending on how large your site is). When it’s done, you’ll find your new backup files under the Existing Backups tab:Now, you’ll want to click on the following four buttons in turn: Database, Plugins, Themes, and Uploads.
This will give you the option to download copies of each file to your computer:When you’re done, you should have four files containing your entire website. Now you’re ready for the next step. Step #2: Create a local staging copy of your siteThere are plenty of ways to create a staging copy of your website, but we’re partial to because it’s easy to set up.
Plus, you don’t need to be a customer to get the app. Just go to the website, fill out a short form, and download the tool.After installing Local by Flywheel, you’ll be able to add new local websites to your roster by clicking on the plus sign in the lower left-hand corner of the application:Do so now, and you’ll be prompted to choose a name and an environment for your staging site. When you get to the environment part, select the Custom option:This will give you the choice of using PHP 7 for your staging website instead of 5, which is the default setting.
Make sure you choose the right version, and then create an admin name and password for your site. After that, sit back while the app sets everything up.Once your new staging website is ready, look for it under the list of local sites on Local by Flywheel’s main screen. Then click on the Admin button that will show up next to its description, to access your dashboard:(Note; if you need some hands-on guidance on how to use Local by Flywheel, we’ve got a whole tutorial on that.)The first thing you’ll want to do here is install the UpdraftPlus plugin once more.
When it’s running on your staging site, return to the Settings → UpdraftPlus Backups tab and look for the option that reads Upload backup files:Now, drop the four backup files you downloaded earlier into the designated area. When the upload is complete, you’ll see your backup appear on the list. Click the Restore button next to it, and you’re in business.
Step #3: Test your staging siteWhat you’ve just done is created a staging website that’s a perfect copy of your original site in every way, except for the fact that this one is running PHP 7.Now comes the part where you look for errors on your staging site. What you’re looking for and what issues you might find will vary widely depending on your unique setup.
However, here’s how we recommend you go about conducting your test:. Make your way through every page on your website, looking for any elements that have suddenly stopped working.
Check to see if your plugins are behaving as they should, one by one. Test any features that your active theme includes, to ensure that they’re still functioning.This might take a little time, depending on how large your website is. If you run into any broken plugins or themes, it’s worth looking for replacements, since PHP 7’s benefits are well worth making a few changes. Step #4: Upgrade your live site to PHP 7If you didn’t find any errors on your staging website (or after you’ve identified the source of any problems that do appear), all that’s left is to upgrade your live site to PHP 7. As we mentioned earlier, this process is rather simple.
There are two ways to approach it, depending on your host:. If you use a Virtual Private Server (VPS) or any other hosting option that gives you full control, you can upgrade WordPress to PHP 7. If your host doesn’t give you this level of access, you can ask them to upgrade you to the latest version through their support system.When you’re done, be sure to test your site’s performance again (just to be safe). Then you can start enjoying the improvements PHP 7 provides! ConclusionPHP 7 has been around for a while now, yet adoption rates are nowhere near where they should be.
This new version offers a marked increase in performance, and most reputable web hosts will give you the option to upgrade WordPress to PHP 7. If yours doesn’t, then it’s probably time to.
So I've searched the forums and haven't found the answer for this yet and have also checked the wordpress forums, so I'm not just asking without doing research. If I do assign a user to the database I get this error:Warning: main( /home/cpanelname/publichtml/blog/wp-includes/cache.php) function.main: failed to open stream: No such file or directory in /home/cpanelname/publichtml/blog/wp-settings.php on line 128It appears you had the database portion working (you.should.
have the user assigned to the database). But when you did it failed because you are missing the cache.php file in your installation.
Check your installation because it appears at least one file failed to get installed properly (cache.php in the wp-includes directory).