Proper Way to Upgrade PHP Version on WordPress

Keywords: WordPress - Google Cloud Platform - How to - Upgrade
Description:
On old-fashioned servers with CPanel to upgrade PHP version from 7.0 to 7.2 on a WordPress install, in PHP Settings you can just choose a PHP version, click a button, and in one minute you’re done.

But I gather on a Bitnami stack it appears it is much more complicated. From searching the docs, I have arrived at what I think it necessary, but, I hope I’m wrong and there’s an easier way?

From what I gather, you cannot upgrade PHP version on an existing Bitnami Wordpress stack. So you have to migrate your content to a new Bitnami server with a new install of WordPress?

Here’s what I think I have to do…please correct me and answer my question about https: migration below…

  1. Use the Deployment Manager to install a new Virtual Machine on Google Cloud with the Bitnami Wordpress version that has the right PHP version I want (7.2).

  2. Assign a new static IP to that new VM instance. SSH in to the VM Instance and configure SFTP keys, etc.

  3. Change that new server’s settings to match what you had on your old WordPress server: Php.ini, htaccess.conf, etc.

  4. On your current WordPress install, upgrade the WP version and all plugins and themes.

  5. Then install on current WordPress the All In One WP Migration plugin and export the entire database, pages, posts, and media to an export file and download to your local PC. When you download an https:// site you should tell All In One WP Migration to find https:// yourdomainname.com in database and convert that to http:// yourdomain.com since your new site won’t have https:// at first, until the domain name is pointing to it?

  6. On your new server, install All In One WP and import the file. All your content is now in WP, but, you have no https:// and your site is not secure.

  7. Change your DNS server to point your domain to the VM instance static IP.

  8. When the domain is resolving to the new site (which can take a while), you can now SSH into your VM Instance and begin the entire process of installing a Let’s Encrypt SSL certificate on the new server.

  9. Once the SSL is installed, you edit your WP-Config.php to change the domain from http:// yourdomainname to https:// yourdomainname and in WP Settings > Permalink click twice to save the change.

  10. Use a Search and Replace plugin (or in phpMyAdmin edit the database yourself ) to replace all instances of http://yourdomainname.com in the database to https://yourdomainname.com so links to media images, etc. are corrected.

  11. Your site is finally migrated with https: running again on a new VM instance. You now have to delete your old WordPress VM Instance so you aren’t paying for it anymore.

Golly, this seems incorrect that you have to do all this? Isn’t there a quicker way to just upgrade your PHP version on the existing WordPress install?

And is it necessary to reinstall the secure certificate all over again? From what I know, you cannot move SSL to a new IP address nor can you install SSL on a VM instance until your domain name’s DNS is pointing to that IP address.

Hi @atlanta,

Thanks for using Bitnami. Unfortunately, currently the way to upgrade PHP is creating a new instance a moving the data to it. However, you should be able to reuse the same certificate as having the DNS pointing to the target instance is only needed during the creation process to validate the challenge.

Regards,

Andres R.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.