Author: Manuel Lemos
Updated on: 2022-05-06
Posted on: 2022-05-06
Viewers: 176 (May 2022)
Categories: PHP Tutorials, Lately in PHP Podcast
Please read this article, watch an 11-minute podcast video or listen to the audio of part 3 of episode 92 of the Lately in PHP podcast to learn how to plan a PHP version upgrade process so it can conclude successfully.
In this article you can learn:
How to Plan a PHP Version Upgrade Successfully
1. Previous Article: Why You Need to Choose the Right Moment to Upgrade to a New PHP Version
2. Previous Article: When Is the Right Time to Upgrade
3. This Article: How to Plan a PHP Version Upgrade Successfully
4. Next Article: How to Setup a Development Environment Separate from the Production Environment
Download Size: 6MB Listeners: 404
Introduction music provided by http://spoti.fi/NCS
Sound effects obtained from https://www.zapsplat.com/
In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.
See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.
Episode 92 Part 3 Video
3. What Should You Do Upgrade Successfully
3.1. Plan the Upgrade Steps
Upgrading to a new version is always a delicate operation. So what you need to do is to plan the upgrade steps.
The correct order must specify the upgrade steps, so you first execute the most important steps and then the steps that depend on the first steps.
For instance, if you want to upgrade the PHP version that you use on a server, you can follow steps like this:
3.1.1. Test the Upgrade in the Development Environment
It is always safer to test upgrading your PHP version or even the operating system version in a controlled environment.
A development environment is a place where it is safe to test and make mistakes. I will detail more about setting up a development environment ahead.
3.1.2 Schedule the Upgrade Date
The day you will do the upgrade is critical because that is the day you need to be ready for actions that may fail due to unexpected details that you have not anticipated.
So it is possible that your site goes through some downtime, and nobody may be able to use it.
To minimize losses caused by this downtime, you can schedule your upgrade to specific weekdays when your site traffic is lower.
You can try to use site audience statistic tools like Google Analytics or Google Search Console to figure out those lower traffic days. Usually, those are weekend days. Depending on your site, the low traffic days may be a different set of days.
You also need to be able to work on the days that you schedule for an upgrade. I work even on weekends and holidays, but you may have different criteria to pick your workdays.
3.1.3 Put Your Site in Maintenance Mode
During the upgrade, the users cannot access the site resources. You can show a message saying the site is going through a maintenance procedure, and the users should try to get back later.
3.1.4 Upgrade to the Newer Version
The actual upgrade procedure of PHP or the operating system depends on the distribution you use. You should follow the company's instructions that provide the operating system or the hosting company.
If for some reason, you prefer to install PHP from its source code, you may want to read first the PHP installation from the source instructions from the PHP site.
3.1.4 Test If the Upgrade Succeeded
To verify whether the upgrade succeeded, you should follow the same testing procedure you performed in your development environment.
3.1.5 Take the Site Out of the Maintenance Mode
If all goes well, you are ready to take your site out of maintenance mode.
You need to be a registered user or login to post a comment
1,597,655 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
No comments were submitted yet.