How to upgrade WordPress to PHP 7 (and why)

Recently, wlift experienced performance problems. 502 error. Server speed drops… No fun. In order to solve these problems, our research has brought us to this post, hoping that this post can become a source and guide for this very important topic. The version of PHP running on the server of the WordPress site. In particular, why the latest version should be used and how to execute it. Is it sexy? Everyone likes to discuss the PHP version with friends and have a good night. But this is not the most interesting topic, but it is very important on the WordPress website. The
In this post, we will first introduce: The reason why the PHP version is very important is why the PHP version should not be used (it can also be used on most WordPress websites). Then, based on the experience of moving wplift to PHP 7.1, we will share some tips on how to upgrade the PHP version of WordPress websites. What is the PHP version and why is it important? Start from scratch… Because I’m not a developer, it’s easy. But here’s a big picture. WordPress is mainly written in a scripting language called PHP. Whenever someone visits your site, the PHP code will run on your server and \
The article will continue below, so PHP is helpful for WordPress website. But there is a problem. There is no single \
At the time of writing, the latest version is PHP 7.3. But WordPress. According to org statistics, 34% (the vast majority) of WordPress websites are running PHP 5.6. At present, there are four versions that are old-fashioned. Although PHP6 is not available, the version is still PHP… 5.67.07.17.27.3, that is, php5.6 has returned to four versions! It’s like running WordPress 4.6 instead of WordPress 5.0! The report will continue as follows. In addition, fully 20% of WordPress websites run PHP versions earlier than PHP 5.6. As of march2019, WordPress itself does not provide any support under PHP 5.6, so this is a considerable problem. The
Why is it bad to use the old version of PHP? Next question – why is it bad for many people to use the old version of PHP? First, there is a huge performance difference between PHP 5.6 and PHP 7.1+. Kinsta’s PHP benchmark shows that PHP 7+ handles more than twice as many requests per second as PHP 5.6. This has become a great motivation for upgrading and helps to make wplift more stable. But in addition, previous versions of PHP no longer receive updates including security changes. PHP 5.6 and even PHP 7.0 are no longer supported for activity or security. In other words, PHP 5.6 and PHP 7.0 have run out of life. The
According to the PHP groups website, this means:
\
In addition, if plug-in → add mobile, you can no longer install plug-ins or themes that do not support the PHP version. The method of upgrading WordPress to PHP 7 is now very important – in fact, the method of upgrading WordPress sites \/ servers to PHP 7.1 or above. First – good news. If you are on a good host, the actual process of updating the PHP version should be very simple. In general, there must be an option on the managed dashboard that can be switched without special knowledge. For example, on SiteGround (here is the host used by wplift), updating the PHP version is as simple as selecting a new radio box in cPanel. The
If you encounter difficulties, you’d better ask the host for support. If the host does not support PHP 7+, you must switch to one of the recommended WordPress hosts. Because that’s really bad. There are other steps you need to take to ensure that you pass the wound correctly, but changing your PHP version may cause problems. To successfully switch from PHP 5.6 to PHP 7.1, wplift performs the following operations: 1. check the compatibility with plug-ins or themes. WordPress core can run on PHP 7+, but it does not mean that all plug-ins and themes can run. The
Now, any good developer may have determined long ago whether the plug-in and theme are compatible. However, you must use the PHP compatibility check tool to verify again that this is appropriate for your site. SG optimizer plug-in is part of the function, including PHP compatibility checker. WP engine also provides an independent PHP compatibility checker plug-in. You can run tests on the environment optimization tab of SG optimizer. The WP engine plug-ins are as follows: Male 2 Use dump site and thoroughly test. If compatibility issues are detected, set up a dump site on a server that has PHP 7.1 or later installed. The
This allows you to test the site in a real-world environment and find problems before changing the live version of the site. WordPress has several ways to create dump sites. Hosts – many managed WordPress hosts provide dedicated dump functionality, including the option to use various PHP versions of the dump site. WP stagecoach – WP stagecoach is an independent service \/ plug-in that can create independent dump sites regardless of the environment. This is what wplift used when we upgraded to PHP 7.1. Manual method – you can also manually migrate the site to a new personal environment. It takes time, but it’s free! 3. make a backup before cutting in. After completing the thorough test of the dump environment, you can jump in and upgrade from the site. The
But before that, perform a full backup to ensure that the most recent backup exists in the opportunity of problems. 4. thoroughly test the site website
After upgrading the PHP version on site, please test again for problems. Please pay special attention to matters that the dump site may not find, such as transaction emails sent by the WordPress site or other hidden tasks. The last idea is that it is easy to update the WordPress website to PHP 7.1 or above. The latest version of PHP is faster and more secure, ensuring that the site continues to use the latest plug-ins and themes. If not, take some time to do some tests, and then do the following: Use the plug-in of SG optimizer or WP engine to conduct a thorough test on the backup site before completely changing the test site on the dump site of compatibility problem confirmation. After moving the test wplift to PHP 7.1, the WordPress dashboard and the front end of the site are more stable and more valuable have Is there a problem with PHP 7.1 or later conversion? Ask in the comments section!

Author:

Leave a Reply

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