Today we will be discussing how to change the PHP version of your WordPress website with NameCheap, BlueHost, GoDaddy, and HostGator.
- How to Update PHP Version in NameCheap
- How to Update PHP Version in BlueHost
- How to Update PHP Version in GoDaddy
- How to Update PHP Version in HostGator
The key to running a successful online business is to make sure that you’re up to date with the current market trends.
From managing your site’s user interface to making sure that you are running the latest PHP versions – this maintenance is not only helpful but crucial in the long run.
Although WordPress is built on coding languages like PHP, you don’t need to learn these languages to successfully manage your website.
However, you do have to make sure that you’re running the latest version of codebases and plugins, as hackers often attack outdated versions of software.
Hackers can induce havoc on your website homepage, launch multiple spam pages, display malicious ads, and more. You can save yourself from this nightmare by making sure you’re running the most recent version of PHP. To help you with this, we’ve shared a detailed step-by-step process on how to upgrade WordPress PHP versions.
What is PHP on WordPress?
We all know that websites are built with code. What visitors typically interact with is the beautiful front-end; but at the back-end, some extensive scripts are running that help us achieve full functionality.
PHP is a dynamic programing language that runs on the server-side. It allows us to use and operate different functionalities on our websites such as navigation menus and buttons.
PHP is by far one of the most important languages of Web development. Hence, a lot of WordPress plugins are also written in PHP.
Why do I need to upgrade my PHP version?
We mentioned that PHP is a server-side programming language. This means that if any problem arises on your website, it stems from the PHP version at the backend. Here are the 5 main reasons why you need to upgrade your PHP version.
Speed and Performance
The developers that are working on the backend are always trying to improve and enhance the website performance. For this, they call multiple functionalities from the PHP language to save user-side server load. By updating your PHP version, your site will see a performance improvement along with speed enhancement.
Just like WordPress, PHP is an open-source programming language. Meaning that anyone can download it, modify it, make some changes, and contribute to the development.
This language is already very popular in the world and is an all-time favorite of many programmers.
These factors make PHP very attractive to hackers. Therefore, if you are running an outdated PHP version you might be exposing a vulnerability. When vulnerabilities appear, developers typically fix them and release a new version with improved security measures as quickly as possible.
By making sure you’re up to speed with the latest updated PHP versions, you can avoid countless potential issues.
Search Engine Optimization
This one is for all the webmasters out there. Studies show that if you’re running a website that has more than 3 seconds of load time, about 40% of the visitors will bounce back from your website.
Google has also made the page loading speed very crucial for the website ranking process. PHP addresses this by making the coding a bit lighter with each upgrade, so websites can continue to run seamlessly.
WordPress and PHP go side by side, as the developers of your themes and plugins will continue to introduce new features that will require you to upgrade your PHP version. If you’re running an older version, you might get a message to upgrade in order to enjoy new features.
MailChimp, for example, is a popular email marketing platform. The developers of this platform always require you to run the latest version of WordPress and PHP.
New Features and Improvements
In general, updating your site to the newest PHP version ensures that you’re rocking the newest features introduced by the developers. One quick example of this is that PHP recently introduced a new feature called preloading in the PHP 7.4 version.
Preloading in PHP 7.4 enables websites to load faster by loading commonly used classes and functions into memory. Therefore, any sites using a version prior to PHP 7.4 will likely see much slower loading speeds.
It is a good practice to manually check for PHP updates and read patch notes every so often. PHP versions typically have a lifespan of two years and receive six months of security updates. After that, the developers stop supporting that particular version.
Before you Upgrade
While it is unlikely that you will encounter major issues while changing your PHP version, however, it is still better if you play it safe.
Before you make any major changes to your website or perform a core upgrade, it is always recommended to perform the following tasks.
Make a Backup of your Website
If you’re running a famous hosting provider like Bluehost or Namecheap, you will get a dedicated button for backups in your hosting account.
Otherwise, you can just go to your cPanel dashboard, look for the file WP-Content and download it. If you are running in Amazon EC2, check out this guide from AWS.
Use Maintenance Mode
Most of the time Maintenance mode is available through your active Theme. The only tricky part is to enable it from the settings. Some developers like to use under construction mode as well.
If you can’t find it, then just install a Maintenance plugin from WordPress. It is important that you use this because PHP will take anywhere from 5-20 minutes to install on your Website.
Check the current PHP version
Before you upgrade, you must check the current version of PHP. To do this, you have to log in to your cPanel account. Access your web hosting, navigate to the software tab, select ’PHP version’ and write down the version details on NotePad or TextEdit.
In case the feature is not available in your cPanel account, then install the Display PHP Plugin.
Update your Themes and Plugins
This step is very important if you’re running third-party themes and plugins. After updating, there’s a chance that some functionalities of your website won’t work.
To ensure maximum compatibility, make sure your website themes and plugins are fully up to date before the upgrade. For this, you can go to your Dashboard > Updates and install all the available updates.
How to Upgrade PHP Versions in WordPress
By using your hosting service, you can easily upgrade the PHP version of your website. Now, every host is a little bit different when it comes to account management.
A Google search associated with your hosting name can unveil quick answers.
We will provide the updated instruction for the 4 most common hosting providers; NameCheap, GoDaddy, HostGator, and BlueHost. If you’re using any other hosting, then follow the instructions in these links:
How to Update PHP Version in NameCheap
- Visit NameCheap and log in with your account
- Go to your cPanel and navigate to Software > Select PHP Version
- Here your Current PHP version is mentioned along with any updates if you have any:
- Use the blue dropdown menu to select the updated number
- Click on the button ‘set as current’
- Your PHP version is now updated
How to Update PHP Version in BlueHost
- Login to your BlueHost cPanel (control panel) Account
- Scroll down to the Programming Section and select ‘PHP config’
- Select the PHP version from the radio buttons
- After that, click on ‘Save Changes’
How to Update PHP Version in GoDaddy
- Login to your hosting account dashboard
- Go to My Products > Web Hosting > Manage
- Navigate to the Settings option and switch the tab to Servers
- From here, click on the option ‘PHP Version’
- A small pop up will appear, stating what current version you’re using
- Here, select the ‘Change PHP’ version and select the PHP version you would like to use
- Click on the ‘update’ button and select save changes
How to Update PHP Version in HostGator
- Login to your cPanel hosting account
- Navigate to the software section and select MultiPHP
- Select the domain name you want to update
- Choose the preferred PHP version you want to install
- Click on Apply
Self-check for testing your site after Update
Although rare, update issues can occur. Once you’ve updated your site, follow the instructions provided below for self-testing:
- Check your theme functionalities and ensure they are working as normal
- Randomly visit pages and posts to check if anything seems out-of-order
- Upgrade your theme and plugins if available
- Download a newer version of your backup
If any unusual circumstances occur, contact your hosting provider for a quick solution. You can also revert back to the previous PHP version, but contacting your hosting support first is always recommended.
Congratulations, you’ve successfully installed the latest PHP version on your Website. Now go ahead and check the current version of the PHP. It will surely be the version you just installed.
Remove the under-maintenance mark from your site and enjoy the upgraded functionalities.
If you still have no luck updating your PHP version, then you should contact your hosting company. They will have access to upgrade your PHP version for you.
Using outdated software not only negatively affects your site but also makes it prone to a larger amount of security threats.
By updating your site to the newest PHP version, you will get the peace of mind that you’re as protected from hackers as you can be.
However, this is only one step towards fully securing your site. You should always follow extra precautionary measures, just to be on the safe side.
- Update your WordPress, theme, and plugins
- Make sure you’re using a good hosting provider
- Enable security features from your hosting settings
- Use a reliable SSL certificate
- Monitor your website on the Firewall to check for possible attacks
- Take a backup of your site, in case, things go south
- Use a strong password for your website
With these steps in mind, your WordPress website will perform better and be more secure overall.
Read More: Learn How to Add Google Adsense to WordPress
Frequently Asked Questions
How can I prepare my site before the upgrade?
You can prepare your site by updating the themes and plugins. Utilize maintenance mode on the front end and download the latest backup file.
Does updating PHP break my site?
There’s very little chance that your site might break after an upgrade. But that’s nothing to stress about as you can easily roll back to the previous version. Plus, you can use the backup files as well.
What is the best PHP version for WordPress?
The best version of PHP for WordPress is always the latest one. It comes with new security, better features, and tons of improvements. Use the latest version of PHP to improve your site speed and load time.
If you need help, please contact our support team for assistance upgrading PHP versions.