7 Common WordPress Errors and How to Fix Them
WordPress is a great piece of software that works fine most of the time. But there are times when things stop working. Maybe WordPress can’t connect to the database or maybe some files have been […]

Copy the link to a markdown format of this article for ChatGPT, Claude, Gemini, or your favorite AI.
When it comes to troubleshooting technology, everyone loves the tried-and-true methods of rebooting or hitting it really hard. Unfortunately, those solutions don’t help much when dealing with PHP issues on your WordPress site.
In this post, we’ll look at some of the most common PHP errors that occur on WordPress sites and how to fix them.
WordPress is primarily written in PHP. This means that each time your website is rendered, it requires PHP to run WordPress core, as well as any WordPress plugins and themes.
Like any other software, PHP is continuously evolving. Each new version introduces various changes, such as performance improvements, security enhancements, and new functionality. While most WordPress plugins and themes are great at keeping their code compatible across PHP versions, incompatibility with certain versions, especially old ones, can sometimes introduce bugs.
WordPress recommends sites use PHP Version 7.4 or greater. The release of WordPress 6.3 also ended support for PHP 5.
You want to use newer versions of PHP because they’ll be faster and more secure. Read our post on why PHP versions matter to learn more about the benefits of keeping your PHP version up-to-date.
To see the PHP version and settings for your site, log in to the WordPress admin, then:

Taking the time to make sure all parts of a website are updated and compatible with the newest version of PHP will save everyone from a lot of sleepless nights. We recommend three core actions before executing any PHP updates.
Don’t think that if you update one, you won’t need to update the other. Having an outdated WordPress site try to run an up-to-date PHP is a clear path to disaster. For customers using Pressable’s managed WordPress hosting service, know that you’ve already been updated to the most recent version of WordPress.
Prior to performing any updates, be sure to make a backup of your site before making any changes. That way if any issues occur from updating WordPress, you can reload that backup and figure out the problem. Once WordPress has been updated, you can move onto checking everything else.

This step can be a little more tedious than the first. You’ll need to look through both of these to make sure they’re running on up-to-date versions. If there are any updates available, make a backup, then complete those updates.
Good news: If you’re using Pressable’s managed plugin update features, backups and testing are already handled for you during each plugin update.
If you’ve been neglecting maintenance for a while, keep an eye out for any plugins that haven’t received an update within a year. It’s incredibly likely that these are not compatible with a newer PHP version and will ultimately break your website.
Another thing to pay attention to is themes/plugins that have paid licensing that are expired and haven’t updated. If you’ve let a premium plugin’s license lapse, it’s possible that these plugins aren’t showing as having an update available.
Now, with this all sorted, you can find alternative plugins for those that are outdated and then move on to checking the last part of your website.
If you had a developer make a custom theme or plugin for you, we recommend getting in touch with them to review if it will be compatible with the update. If not, you will most likely have to review an alternative option, to keep your website running smoothly once updated.
With these preparations in place, you’re ready to make the switch to a new version. From here, you can actually test to see if your site will run on the new PHP on a staging site. Back up your live site, copy it into a staging environment, and test out the newer version of PHP. If all goes well, you are good to upgrade your live site!
If you’re running updated versions of PHP and WordPress and still getting an error, the first step is figuring out what the error is. Your web server’s error log will record any PHP errors.
Pressable customers can find their error log by logging into My Pressable and selecting the site they want to review. Do this by clicking the Logs tab and PHP Logs. Click the Get Latest button to see the recent errors.

It’s possible to see a variety of PHP errors on your site. Let’s take a look at the most common ones you may encounter.
Some of the most frequent PHP errors and issues with WordPress include:
If you’re dealing with one of these common PHP errors, don’t panic. None of the errors that caused this are any that can completely wipe your website off of the face of the internet.
In most instances, one of the items listed above is responsible. If you have a backup from before the update when live on the site, great! Reload that backup and work from there.
No backup? Consider this a valuable learning opportunity of the importance of doing so before updating core code. Then, take the following steps to repair the issue.
Start by increasing your PHP memory limit. Some cheaper hosting plans set extremely low defaults. That’s not the case with Pressable. You can learn more about our PHP settings and limits here.
This step isn’t any different from earlier. Make sure WordPress is up to par before moving on. Complete the manual update and check your site. Is it working now? Great, you’ve probably solved the issue. To be on the safe side, we suggest you make sure everything else is updated. If your site is still not working, continue to the next step.
A deactivated plugin isn’t a deleted one. You’ve simply paused the interaction between the plugin and your site. Once you’ve done this, go check on your site. If things seem to be running smoothly, skip the next step. If not, continue on.

Outdated themes can cause a lot of issues. Temporarily switch your site to the standard WordPress theme to allow a new PHP to get along with your website. After this, your site should be running fine, although it’ll look a little different. Log back into the admin side of WordPress to continue.
Run all the updates. Yes, everything. All plugins and themes. Be sure to check whether you need to remove anything that you don’t need or hasn’t been updated within a year.
Once everything is updated and unneeded items are gone, start turning things back on one by one. Be sure to check your site after every change to make sure it’s still in working order. If your site breaks after a specific change, you caught the culprit red-handed! Deactivate it once again and search for a replacement, as it is no longer compatible with PHP.
Updating everything and manually turning on and off plugins is the best way to troubleshoot the most common problems with PHP and WordPress. It’s like using a broad-spectrum antibiotic. It covers most of what could go wrong. For more specific error messages, try these solutions.
If you get a message that WordPress can’t modify header information and headers are already sent, the likely cause is characters or spaces before your opening tags or after the closing tags. The WordPress documentation walks you through how to fix this issue.
This error message most likely means a plugin is trying to find data or a file that doesn’t exist or isn’t accessible. Start by following the update and troubleshooting steps from earlier. If that doesn’t solve the issue, check your functions.php file for any misspelled functions.
Sloppy code is the most likely cause for this error. The good news is that it’s also the easiest to fix. WordPress will typically tell you which file and the line number the error occurred in. You’ll need to access the file and fix the code.
If you see “parse error: unexpected” you’re likely just missing a character. For example, if you get Unexpected ‘)’, you probably just forgot to include an opening bracket (.
The two most common reasons you’d see this error are if you forgot to include a $ when referencing a variable or if you’re missing quotation marks around array keys.
They say a good offense is the best defense. It’s true where PHP issues are concerned. The best way to handle PHP errors is to avoid them in the first place.
To avoid PHP errors on your WordPress website, follow these best practices:
Dealing with PHP issues is not a walk in the park. To make your job a little easier, we’ve compiled a few helpful resources:
If you’re new to Pressable, check out these support articles to learn more about how we handle PHP:
No one likes dealing with PHP issues. The good news is you won’t have to if you keep things updated and are careful with your plugin selections and use of custom code.
When something does go wrong, the Pressable team is here to help. When you host with Pressable, you get automatic updates to WordPress and PHP. We also include free staging environments so you can test things out without your customers (or your boss) seeing something if it goes wrong on the first try.
Want to test us out? Request a free demo.
WordPress is a great piece of software that works fine most of the time. But there are times when things stop working. Maybe WordPress can’t connect to the database or maybe some files have been […]
Using a chatbot is no longer an option. Chatbots are becoming a necessary and cost-effective way to communicate with customers. And more people interact with chatbots than you think. As of now, 80% of businesses […]
E-commerce customers come to your website with high expectations. They want instant answers to questions and 24/7 support should they run into a problem. The challenge for business owners is you can’t always have a […]