How to Quickly Resolve the Most Common WordPress Problems

Last Updated on April 24, 2020 by Sunny Staff

Anyone who has ever run a website knows that frustrating feeling of despair when you enter your website address or refresh your browser tab and get an error. You’re losing time, money, visitors, and potential leads! Even if you run a lifestyle blog, that’s unpleasant, not to mention if you have an e-commerce or other business-related websites. So how to fix those errors and get your site up and running in minutes? Let’s check out some of the most common WordPress problems and how to troubleshoot them:

Syntax Errors

WordPress syntax error

Often you face errors on your website that indicate something is wrong with the syntax of your code. Since WordPress is written in PHP, in most cases, to troubleshoot them, you should have some PHP training. Sometimes the fix can be simple:  change your PHP version or locate the line that experiences a syntax error and find out that it calls for a missing file and you will be able to add it from a fresh default installation. If you’re not acquainted with PHP coding, you may need to contact your web-developer. Or, if the issue is with a newly installed WordPress theme or plugin, it’s probably best to call their support for help fixing the problem.

 

Internal Server Error

Here are two common causes of an internal server error:

1) Incorrect Permissions for Your WordPress Files and Folders

Incorrect file permissions are surprisingly common. The correct permissions for a website to function properly are 644 for files and 755 for folders. You will be able to see them in the majority of control panels. For instance, in the cPanel, it’s displayed near the file type and can be changed just by clicking on the permission number. 

WordPress Permission Problems

 

2) Conflicts in the Configuration File

This one is applicable for Apache or Apache-based servers (i.e., Litespeed) where the configuration file is .htaccess. It may happen that the default redirect rules you added are conflicting with the rules added by some plugins. To check whether that’s the reason, try to rename the file to .htaccess_disabled. If it fixes the issue, that’s great. Now you can enable the file to disable each rule one by one adding # before a rule syntax. Alternatively, you can create a new .htaccess file and copy the core rules necessary for the website functioning. Don’t forget about the most important one, default WordPress that is responsible for the permalinks structure and  looks as follows:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase / RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L] </IfModule>

 

Blank Page Error

This WordPress problem is often referred to as the “Blank Screen of Death.”  In most browsers, this error displays a completely blank, white screen. However, in Chrome, it gives you a warning saying, “This page isn’t working and is unable to handle the request.” To start troubleshooting it, you may need to go to your website file directory and locate the error log here. Usually, it indicates the faulty file within the theme or plugin. Example of such error in the error log:

[05-Apr-2020 02:57:05 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function greenmart_tbay_get_config() in /home/example/public_html/wp-content/themes/greenmart/header.php:22

As an alternative, you can locate your wp-config.php file and enable debug mode. Just write ‘true’ near ‘WP_DEBUG’ function (by default, it’s set to ‘false’).

WP_DEBUG

 

Another option is to enable PHP error display in the PHP settings so you can see the errors right away. You can do it in your PHP settings in the control panel. For cPanel, the menu is called ‘Select PHP version’>Switch to PHP options. Once you opened this menu, just put a checkmark near the display_errors settings.

WordPress PHP Error Display

 

When you find the faulty WordPress plugin or theme causing the problem, you may want to change it. It’s easy when you have access to your WordPress admin dashboard, but if not, there is still a way to do it. To change the theme, try the following options:

1) Find out the database name. It can be done in the wp-config.php file > string define(‘DB_NAME’)

DB_Name

 

2) Go to your control panel and find the database management settings. Usually, the menu where you can find it is called PHPMyAdmin as it is the most common way to modify your database. When this menu is opened, locate your database and go to the menu wp_options. Please note that it may bear table prefix specified in the abovementioned wp-config.php file so this option can look like wc245_options ( if your prefix is wc245_). To change the theme, find the rows’ template’ and ‘stylesheet’. They may be located on the second or third page.

DB Management Settings

 

Change these values to any other themes located in your wp-content/themes directory. It’s recommended to test it first with the default WordPress themes. The most recent one is ‘twentytweny’.

 

2.1 To disable the plugins, you will need the same table wp_options > active_plugins 

WP Options Active Plugins

 

Before making any modifications, copy and save the text starting with “a:” in some safe place. If there are a lot of plugins for the installation, it will be easier to refer to this file when re-enabling plugins.  Some caching plugins may spoil the testing results, that’s why it may seem wiser to delete all the text (in this case, all the plugins are turned off). Then go to the page and refresh it to check. When everything is working fine, you may return to your WordPress admin dashboard and enable the plugins one by one. Now the text you saved earlier comes in handy – refer to it each time you’re not sure whether you used a certain plugin. For example, sucuri-scanner/sucuri.php in the screenshot is a plugin called Sucuri Security. You can Google the text when unsure.

 

PHP Limits Related Errors

PHP Limit Error

Sometimes the scripts of plugins or themes cannot be executed correctly due to the lack of resources. To fix it, you just need to increase the PHP limits. If that’s only the memory, you can add the following string to your wp-config.php file:

define( ‘WP_MEMORY_LIMIT’ , ‘512M’ );  (or any other number value depending on the requirements)

It’s also possible to perform the changes in the PHP settings within the control panel. In our case, it’s Select PHP version menu > Switch to PHP options.

PHP Options

As an alternative, you can increase these values by adding the default php.ini file and increase the necessary options there. The most common PHP options that need to be modified are the following:

memory_limit = 128M
post_max_size = 8M
max_input_vars = 1000
upload_max_filesize = 2M
max_execution_time = 30  (in seconds)

Make sure to indicate the values required by the theme or plugins to resolve the error and enjoy developing your website further. It’s worth mentioning that sometimes low PHP limits don’t cause an error message but result in a slow WordPress website or/and Admin Dashboard. Try increasing them if you experience slow loading.  

 

If you encounter errors other than those described in this article, you can still use the tips described here to help track down and troubleshoot the problem. If something is not working, it’s worth starting from the error log and disabling plugins, switching a theme to default, or disabling the .htaccess rule.

 

Back Up Your Site Often

And the final tip: make sure to have a backup! Even in the worst-case scenario, you will always be able to revert everything back to a previous working version while you work on diagnosing and fixing the problems. There are tons of WordPress backup plugins available. Or, if you’re the do-it-yourself type, check out this article on how to backup your website manually.

 

Wrapping Up

We hope this article has been helpful in getting your WordPress site up and running again, problem-free. At Sunny HQ we love all things WordPress! If you need help with your WordPress site, feel free to drop us a line. Or, if you’d like to find out how we can take the stress out of managing your website, check out our turnkey WordPress hosting, support, and maintenance plans.