Upgrade WordPress To PHP 7+ | How To Do It Safely ⛑️
Articles,  Blog

Upgrade WordPress To PHP 7+ | How To Do It Safely ⛑️

There’s always some risk involved in an
upgrade like this, but there are also ways to carry out the process safely. So, let’s see How to safely upgrade WordPress
to PHP 7 and above. Backing up your site regularly 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. For this step, we recommend using the UpdraftPlus
plugin, since it’s one of the most straightforward backup solutions available. Install and activate 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. There are plenty of ways to create a staging
copy of your site, but we’re partial to Local by Flywheel because it’s easy to set
up. Plus, you don’t need to be a Flywheel 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. 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. The first thing you’ll want to do here is
to 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. What 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 I recommend you to 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 afew changes. If you didn’t find any errors on your staging website, all that’s left is to upgrade your live site to PHP 7. Then you can start enjoying the improvements
PHP 7 provides! PHP 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 choose a new WordPress host.


  • Milos Veljkovic

    When I upload my backup files to local staging site it redirects me to my live version of site/wp-admin and there it asks me to enter my login info not from the local site that I've created, but for active site login. I believe it has something to do with backup files I've downloaded/uploaded since "it's for backup not for migration". I've seen you get the same alert prompted when you upload your files as well. Any ideas how to overcome this?

  • Gustav Hägglund

    I just get this. Fatal error: Cannot use SimpleCalendarAbstracts as Object because 'Object' is a special class name in /app/public/wp-content/plugins/google-calendar-events/includes/objects.php on line 9

    Please help me..

  • Gustav Hägglund

    I solved the last problem with the calendar plugin. It was just a simple plugin update that was needed. Now the site is working but i get "Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'addmetawebcapablelinks' not found or invalid function name in /app/public/wp-includes/class-wp-hook.php on line 286". And I can't reach the admin page for some reason all I get is a blocked warning. Can somebody please help?

  • percy robles

    Hi There,
    I have a problem 😉 I have load my website from de updraft plus backup to flywheel.
    I put in a name for the site en also the admin login.

    Now I want to view the site and in the browser I see first the name that I give the site in flywheel but after that the brower bring me to to live internet site.

    wen I klik on the admin button in flywheel it bring my whit a redirect to my live internet site again.
    See te link there :


    If I login with the credentials of the test site a get a error. If a login whit the credentials of my live website I get into the live website.

    How can I get into the test website in flywheel to test php7 version.

    I also klik on the trust button for ssl in flywheel, my live website have a ssl certificaat.

    I follow the youtube video https://www.youtube.com/watch?v=mv5WM9qM5AA
    Upgrade WordPress to PHP 7+ | How to Do It Safely :rescue_worker_helmet:️
    I’am working on a MacBook Pro latest os version High Sierra 10.13.6

    Do I overlook something?

    Please help my out how to get to the test sit in flywheel.

    Regards Pernate

  • fhikah health

    since i have added php 7 through your suggestion my security level which was secure is not not trusted. Any suggestions why this would be? and how to fix the problem

  • Hunter George

    this doesn't appear to be working correctly any longer.. i'm following all of the steps you mentioned in the video, and when the backup from my live site is restoring, it gives me a "Session Expired" error message and then takes me to a 404 page of my main site's URL, not the staging site.. I can now no longer get to the staging site as well.

    Any thoughts or others who are experiencing the same problem?

  • support mc-salesllc

    If I am looking to automatically backup my site using Updraft, which cloud service do you recommend?

  • Peter Campbell

    Exact same result as George Hunter. Session expired and back to my live site. Looks like this method is dead.

  • Aviol Easter

    PLEASE READ: Before you do ANYTHING make sure you update ALL YOUR PLUGINS! This will make the process WAY smoother on you!

  • KiwiHali

    Thanks for this! Took me awhile to get it all going, but got there in the end. For some reason the theme files didn't restore, and I wasn't expecting that the credentials would change.

  • Ant Brad

    This worked very well but I thought I’d have an independent site “test php 7” site as a local site?. When I uploaded to the New installed updraftplus it brought me to my site… not the local one?.? I thought the purpose of this was to test my site locally without making any changes to my original site? I disconnected internet also to see if the site was active as it should if it is installed locally but it says no internet ….?.?

  • Window Tinting Film

    Once I successfully uploaded my backup files to testing-php-7.local , it's automatically redirect to my live site! So I can't check local site

  • St Gabriel's Pimlico

    Same as comments below, after uploading the backup, when I log in to the staging site it routes me to the live site.

Leave a Reply

Your email address will not be published. Required fields are marked *