WordPress PHP8 Update: A step-by-step guide for Siteground and CPanel
Are you looking to upgrade your WordPress website to PHP8? In this blog post, I’ll walk you through how to do it quickly and easily using Siteground or CPanel.
Updating to PHP 8 provides many benefits, including increased reliability, faster performance, and better compatibility with external dependencies. PHP 8 is also more compatible with Static Analysis tools and provides better code coverage.
Furthermore, deprecated features have been removed, and other features have been changed to work with PHP 8, resulting in fewer compatibility issues. As a result, the WordPress ecosystem will be less impacted by an update to the latest version of PHP. For these reasons, I recommend upgrading your WordPress sites to PHP 8 to benefit from these improvements.
What is PHP8, and why should you consider updating WordPress to support it?
PHP 8 is the newest version of the popular open-source scripting language designed for website and web application development.
Upgrading your WordPress website to PHP 8 can provide various benefits, including improved performance, better compatibility with newer plugins and themes, increased security, and more.
With PHP 8’s new features, such as the JIT compiler and improved type system, you can expect significantly better performance when compared to earlier versions. The enhanced security features included in this version will help keep your website safe from malicious attacks or other vulnerabilities.
Upgrading to PHP 8 is a way to ensure that your website remains up-to-date and secure.
Why should you use the most recent PHP version?
Using older PHP versions on WordPress can have some serious drawbacks. Some of the most common issues are increased security risks, decreased performance, and compatibility issues with modern plugins.
All versions of PHP before the current 7.3 are no longer supported, and it is strongly encouraged that anyone still running any of those older versions should update immediately to the latest version – this is due to the lack of security patches and potential vulnerabilities that could arise from using an outdated version.
Furthermore, even version 7.4 will reach its End of Life on November 28th, 2022 – meaning users should plan accordingly when upgrading to ensure they remain protected against any security risks.
It’s important to note that keeping your PHP up-to-date is not just important for security issues, but also for performance reasons as well; newer versions often contain improvements in speed and accuracy, which can be essential for running larger applications or websites.
Additionally, staying updated with the latest PHP version usually implies that developers have access to more libraries and tools to help them create more efficient code.
All in all, making sure your PHP hosting editions are regularly upgraded is a necessary step towards maintaining a secure environment while benefiting from improved performance and additional features.
How do I know my hosting provider support PHP8 version updates?
Looking for a tool to help you create content that ranks?
NOw AI writer with GPT4
Create Content that Drives More Traffic and Revenue to your Website
You need to log in to your hosting account and check if PHP 8 is available as a choice. Of course, you can also open a support ticket.
Log in to CPanel
Scroll down to Software, and click ‘Select PHP version.’
Here you will see the current PHP version, and you can also click the drop-down arrow and see which PHP versions are available.
Log in to SiteGround
Go to Websites and click on Site Tools
In the left navigation, go to Devs, PHP Manager
SiteGround offers to change PHP Version for the Live or Staging sites.
How do you update WordPress PHP8 in Siteground or CPanel hosting accounts?
Step 1: Back up your website
It is vital to back up a website before updating WordPress to protect it from potential issues. Backing up the website will provide peace of mind and ensure that all content can be quickly restored with minimal effort if something goes wrong during the update process.
Switching the PHP version to 8 is a significant change, and a good backup is necessary.
Siteground makes automatic daily backups for up to 30 days on all WordPress hosting plans. You can perform five backups manually if you are on the GrowBig or GrowGeek plan.
CPanel also has some built-in backup options. However, I would not rely on it based on my experience. I recommend installing a backup plugin. See my article tips for WordPress backup.
Step 2: What is my current PHP WordPress version?
To check your current PHP WordPress version, log in to your WordPress Dashboard. Go to Tools, Site Health, wait until the results are loaded, Then go to the info tab, open server, and you will see the current PHP WordPress version. It is the best way to ensure which PHP version sees WordPress
Step 3: Prepare PHP 8 / Create a staging site – developers’ environment
Creating a WordPress staging site before upgrading the live site to PHP 8 is essential for several reasons:
- It provides a safe environment to test the upgraded version of your website without putting your live site at risk.
- It allows you to identify any potential issues or conflicts before changing your live site.
- Having a staging site makes it much easier to roll back changes should something go wrong while updating your live site.
All in all, creating a staging site is an essential step in safely upgrading your WordPress website to PHP 8 and providing a smooth transition.
Read my separate article on creating a staging website at SiteGround and CPanel. Overall it is an easy process and requires only a few clicks.
Step 4: Upgrade PHP 8
Let me stress that you upgrade to PHP8 on your staging site only.
The process is different between CPanel and Siteground. Let me start with CPanel.
Above, we realized in CPanel, there is a PHP select version option. However, the problem is if we change the version with this setting. It will affect all your websites hosted within your hosting account. Of course, you will not want to do that. You need to open a support ticket and ask them that you only want to upgrade your staging site and provide the website URL to ensure understanding. Support can change individual PHP versions with the Apache PHP handle.
Here is a technical note about the issue with CPanel.
At SiteGround, you can select the PHP version for your staging and life site. It would be best if you had the GrowBig plan. The StartUP plan does not offer to create a staging site.
By default, SiteGround uses the UltraFast PHP setup.
Ultrafast PHP is SiteGround’s specialized version of PHP. It automates common tasks and processes to ensure your website runs at its peak performance.
With ultrafast PHP, your website can handle large traffic while keeping response times low. It also includes features such as an optimized opcode cache and enhanced security settings that help keep your site secure. In short, SiteGround has its method for tweaking PHP.
To select the PHP Version for your staging site, you must change the PHP setup to standard from Ultrafast. After, you can choose a different PHP version for the staging site.
Step 5: Test for WordPress PHP 8 compatibility problems
It is crucial to test for WordPress PHP 8 compatibility when updating WordPress to ensure that all website components, including plugins and themes, will work properly after the update. The best way to test your website is just browsing every page and testing all functionality, like filling out the contact form.
Without testing for compatibility beforehand, there may be unexpected issues with the website after updating to PHP 8, which could result in downtime or other unforeseen problems. Creating a staging environment and testing plugins and themes before an update is the best way to ensure everything works as expected when upgrading WordPress.
Step 6: Turn on PHP 8 for your live WordPress website
For SiteGround, you would go to PHP Manager and change the version on the Live Site tab (see picture above)
For CPanel, you could change the current PHP version or if you have multiple websites in your hosting account, contact support again.
What are some potential compatibility issues that could arise after upgrading to PHP8?
– Incompatible themes or plugins:
One of the potential issues you may encounter when upgrading to PHP in WordPress is incompatible themes or plugins. If you have any themes or plugins that are not compatible with the new PHP version, they will need to be updated or replaced.
– Outdated code:
Another issue that can arise from upgrading to PHP in WordPress is outdated code. It can cause errors and issues with your website. If your WordPress site uses old code, it needs a fix for the new PHP version.
– Security vulnerabilities:
Security vulnerabilities are a further potential issue to be aware of when upgrading PHP in WordPress. If your WordPress site is not up-to-date with the latest security patches, it may be at risk for attack.
What are the values of updating WordPress to PHP8?
The WordPress PHP 8 Update brings many advantages to users, including:
- Improved performance: This update offers improved performance as it utilizes a new execution engine, which is more efficient and faster than previous versions. It means your website will be able to handle higher amounts of traffic and offer shorter response times.
- New features: PHP 8 offers several new features, such as support for named arguments, union types, match expressions, type declarations for internal functions, and the JIT compiler. These features can make coding more manageable and more efficient.
- Increased security: With the WordPress PHP 8 update comes increased security. It includes enhanced security settings like additional error reporting options that help identify potential vulnerabilities in your code or plugins. It can also help protect against malicious attacks by blocking specific requests before they reach your server.
What are the main features of PHP8 WordPress?
The main features of PHP8 WordPress include enhanced performance, new features such as support for named arguments, union types, and the JIT compiler, and increased security with additional error reporting options to help identify potential vulnerabilities.
Is WordPress PHP8 compatible?
Yes, WordPress PHP 8 is compatible with the latest versions of WordPress. Additionally, it is backward compatible with previous versions of WordPress, meaning you can upgrade to the new version without worrying about compatibility issues.
Is PHP8 faster WordPress?
WordPress PHP 8 is significantly faster than its predecessor, including improved speed optimizations and the new Just In Time (JIT) compiler. This makes it possible to execute code more quickly, drastically improving performance.
A step-by-step guide for Siteground and CPanel discusses the importance of upgrading to PHP 8.0 to avoid potential issues. It highlights performance improvements, new features that come with PHP 8, and the compatibility of both Siteground and Cpanel with this version.
You may have noticed that SiteGround already offers PHP 8.2 and Namehero PHP 8.1. I have upgraded all my websites, including this one which is hosted at Namehero, to PHP 8.1.
What is your experience with PHP upgrades? Please let me know in the comment section below or write me an email at email@example.com