The most common WordPress errors and their solutions

I have prepared a list of the most common errors in WordPress. I also mention specific solutions on how to fix them and avoid them in the future.

The most common WordPress errors and their solutions

WordPress is easy to use even for ordinary users who have no programming experience. However, sometimes, certain problems may occur. To avoid being scared of what’s happening on your site, I’ll try to summarize most of them.

Let’s look at the most common WP errors:

Make backups

The first and most important rule is: make a backup copy of the entire page and its full database before correcting each error. Only then go to the solution itself. You may make backups just with a few clicks in the Updraft plugin. It’s a good idea to install this plugin to make regular backups of your site.

Repairing internal server errors

Internal Server Error” or “500 Internal Server Error” in WordPress appear when the server is unable to determine what the problem is. There can be several reasons for this:

Problem in the .htaccess file

Most often, this is an error caused by incorrect directives in the .htaccess file. Rename the .htaccess file using FTP. If that didn’t work, go to administration and save your permanent link settings again. This will generate a new .htaccess file.

PHP limit exceeded

Sometimes the 500 Internal Server Error is caused by running out of allocated memory. To get the solution, contact your hosting provider and increase your limit.

Disabling plugins

If this is not enough, you must disable the plugins to resolve this error. Find the wp-content file in FTP access. It contains a folder called Plugins. You can turn them off by temporarily renaming this folder. If that doesn’t work, there is an error in the theme itself.

Reinstallation of theme

The next step to solve the problem is to reinstall the WordPress theme. Use FTP to download the latest version of the theme and upload it again.

Error log on the server

If it still doesn’t work, contact your hosting provider to provide you with Error log. It contains error information. You may also need developer help to explain what the error log data means.

Many errors in WordPress are avoided by proper hosting.

💡 Tip: Choosing the right hosting is crucial for a fast website ⏱ . I recommend betting on verified quality ➡️ Bluehost or SiteGround.

WordPress Syntax Error

This WordPress error sometimes appears when you try to intervene in the theme code. Most often it is a typo, a syntax error in the code you wrote. To find them, it’s good to know at least the basics of working in PHP. For example, the error message might look like this:

Parse error – syntax error, unexpected $end in 
/hosting-7513/www/vaswordpres.tld/wp-content/themes/sablona/functions.php
on line 38

You need to correct your code to fix this error. To do this, use FTP access. Typical writing errors are an unfinished line or an illegal character in PHP code.

Correction of Error Establishing and Database Connection

Error Establishing and Database Connection in WordPress appears when the site cannot connect to the database server. This usually happens when you change your password or username.

Database error

To resolve this WordPress problem, first check where the error occurs. It can only be in the administration or directly on the site. If it is only in administration, the database may be corrupted. To fix this, go to wp-config.php. Add Entry:

define('WP_ALLOW_REPAIR', true);

Then go to:

http://www.VASADOMENA.sk/wp-admin/maint/repair.php.

You will now repair the database. You do not need to be logged in for this step. Find the database repair button. WordPress will try to find an error. When finished, delete the added line in the file wp-config.php.

Checking the wp-config.php file

If the above procedure did not work, you may not have valid login details in the wp-config.php file. Check them out on these lines:

define('DB_NAME', 'database name');
define('DB_USER', 'user name');
define('DB_PASSWORD', 'password');
define('DB_HOST', 'localhost');

Checking MySQL server

The error can also occur because of increased site traffic when the server cannot process all requests. In this case, contact your hosting provider to test the functionality of the database server.

White screen of death

This WordPress error looks like a white screen without an error message. First of all, you need to check that at least the site administration menu works. There may be several reasons for this error, so we will go through them one by one.

The problem is in the theme

The problem may arise when manipulating the theme or if the theme was programmed incorrectly. Deactivate the changes to the theme and return to the default theme. If the administrative menu still does not work, fix errors using FTP:

Find the wp-content/themes/ directory
Rename the theme directory e.g. from mytheme to mytheme-correction
Now try logging in to the theme menu. If everything is okay, continue to “remove code error”.

💡 Tip for themes: From premium themes, I have good experience with StudioPress themes and multifunction themes Divi and Avada.

Resetting plugins

White screen error can also be caused by plugins. The best way to do this is to turn them off. If you have access to the theme menu, learn how to disable plugins in settings. If the error occurs after you re-enable the plugins, the problem occurs in one of them.

The FTP procedure is more complex:

  1. Find the plugin directory in wp-content/plugins.
  2. Change its name to, for example, plugins-correction.
  3. Save it offline.
  4. Now create a new plugin directory and check if the problem is resolved.
  5. Gradually move the directories of each plugin to the new plugin directory and enable them in the theme menu. This way you can check which plugin is causing the problem. After the white screen reappears, remove the plugin and install another one with similar functions.

Clearing error in the code

There may be errors in the code. Duplicate or conflicting PHP functions in different plugins or incomplete uploading of a plugin or theme (if you just remove the theme or plugin, this may help). A problem can also be a space in the functions.php file or an empty line in the wp-config.php file. If you have made changes to this directory, you must delete them. Alternatively, you can re-upload this directory from the theme.

Another problem in the code is incorrect setting of permissions in directories. Directories should have permissions set to 755 and files at 644.

💡 Do you want a faster ⏱ website? Website speed is important for both visitors and SEO. I got the best results thanks to the WP Rocket plugin, which I highly recommend.

Repairing WordPress error 404

Error 404 occurs when a user on the page is notified that the page does not exist. The most common cause is a problem with the hyperlink setting, the so-called permalink. You will need to reconfigure the permalink setting.

In this error, you can usually enter the theme’s administrative menu. Go to Settings »Permalinks and click Save changes. This step updates permalinks. If this does not solve the problem, you will need to update the .htaccess file via FTP.
Log in to the server using FTP and find the .htaccess file. Change permissions to 666, overwrite .htaccess and change permissions to 660. You can also add this code to .htaccess:

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

Correction of side panel alignment

This WordPress error will be reflected by the sidebar displayed below the page content, not next to it. This error can occur when a user adds a code snippet to the source code and forgets to close the hlml div tag. This will change the theme’s layout.

Review everything you’ve changed recently. Whether you have added the plugin or changed the HTML. Look whether the page on which the error occurs includes <div> blocks. Make sure they are closed. The W3 Validator is a great help in finding this error.

w3validator
W3 Validator

Missing buttons

If a white box appears in the WordPress visual editor instead of buttons, the error is caused by malfunctioning JavaScript or TinyMCE files.

First, try clearing your browser’s cache. Another option is to use a different browser. If that doesn’t work, replace the TinyMCE files. The problem may have occurred during installation or upgrade. Resend the wp-includes/js/tinymce/ file.

If the error is still present, open the file wp-config.php and on top of the file, immediately after the opening php tag, add:

define('CONCATENATE_SCRIPTS', false);

Error due to running out of memory

If the PHP memory has been exhausted, it may look like the white death screen mentioned. Alternatively, an error message appears on the screen:

Fatal error: Allowed memory size of 33554432 bytes exhausted
(tried to allocate 2348617 bytes) in 
/home/username/public_html/site1/wp-includes/plugin.php on line xxx

The WordPress script or plugin has run out of memory limit. You can fix this error through FTP access. Find the wp-config.php file in the site folder. Download it to your computer and open it in a text editor such as PsPad. At the end of the file, before the line saying: “That’s all, stop editing! Happy blogging. “, enter the following line:

define( 'WP_MEMORY_LIMIT', '256M' );

This increased the PHP memory limit by 256 MB. Save the changes and upload the file back to wp-config.php.

WordPress error: blocking administrative menu

It may happen that you may not have access to the WordPress theme menu. This can be caused by the code or plugin that tries to make some changes to your site’s administration. Or maybe you have forgotten your password, or the site has been hacked. One solution is to reset the old password in phpMyAdmin and replace it with a new one. The second solution is to use FTP access.

After logging in, the system returns you to the login page

This WordPress error occurs after entering the login name and password in the login process, but the system still returns to the login page. This is due to an invalid URL, redirecting in the .htaccess file, or by incorrectly configured permalink settings.

First of all, clear your browser cache and cookies. Then restart your browser. If that didn’t work, disable the plugins.

If you still can’t log in, you must turn off the theme. Do this using FTP access in the /wp-content/themes/ file. Rename the theme file. Then try logging in again. If that helped, then the theme update might be a problem. Download the original version and install it.

And if that doesn’t work, try removing it using the ftp .htaccess file and reset the permalinks.

WordPress error: Maximum Execution Time Exceeded

This problem is caused by the fact that you have reached the maximum server value set when loading a PHP script. Servers have a limited time to load the script. Some hosts have time limits set to higher values and some to lower values.

This is a simple way to solve this WordPress problem. You can install the Maximum Execution Time Exceeded plugin. This plugin will increase the loading time of PHP scripts to 300 seconds.

maximum-execution-time-exceeded
Maximum Execution Time Exceeded plugin

To repair the .htaccess file via FTP, follow these steps. Add the following line to the .htaccess file:

php_value max_execution_time 300

If raising to 300 seconds is not enough, raise it to even more seconds.

Problems with uploading images in WordPress

If their placeholders are displayed instead of images in the media library, this is a problem. The error is caused by incorrect files and installation permissions. You will need FTP access to repair it. Use an FTP client such as Fillezilla.

Open file /wp-content/ using an FTP client. Here you can find the folder /uploads/. Right click to access file permissions settings. Set the permissions for the uploads folder and all subfolders to 744. If that didn’t work, try 755. For all other files, enter 644. Remember to save the new settings.

WordPress problems with image size

If you have problems uploading and resizing images, install EWWW Image Optimizer or WP Smush.it. These plugins will adjust the quality and size of the images to your website. You can optimize the images you already have on the site too.

Another problem is when the uploaded image is larger than allowed by WordPress. To upload large images, add the following to functions.php:

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '1000' );

Error message: Are you sure you want to do this?

This is a fairly common WordPress error. It was caused by WordPress searching for nonce in your administration, which it, however, cannot find. You need to check the plugin or theme for the error and fix it.

WordPress Error: Unable to perform scheduled maintenance

If a message appears on the screen saying that scheduled maintenance cannot be performed, it’s because WordPress has set your site in maintenance mode during the upgrade. Tou can repair it via FTP.

Error when updating site automatically

Sometimes, there is a problem with the automatic update of the page. A PHP error report, update failure, or blank white page may appear. The most common reason are incorrect file permissions. In this case, try to update the page manually.

Problem when saving changes

From time to time, it may happen that changes are not saved while editing the page. Clearing your browser’s cache may help you. The browser may have loaded the saved version of the page directly from the cache.

What to do if WordPress does not send emails

This WordPress error is manifested in the fact that the email communication and contact form on your site does not work. This may be because other hosting users from the same hosting provider have disabled or restricted email communication from their site or your hosting is not configured to use PHP.

Use SMTP to prevent this error. For example, MailGun and Gmail. To do this, you can use the WP Mail SMTP plugin.

WordPress error RSS Feed

These WordPress errors are caused by formatting. They differ depending on the browser used. To fix the error, use the functions.php file in your theme. Check that there is no extra space or hyphen at the end of the php tag.

WordPress error: too many redirects

The reason for redirection may be moving the page and redirecting users. However, it may happen that user can remain blocked between two mutually redirected pages.

Error in uploading file to disk

The most common cause of this WordPress problem are incorrect settings for file permissions. Use FTP client access to check the permission settings. Then go to the wp-content file. In this file, select Permissions. Make sure the settings are correct:

All directories — 755 or 750
All files — 644 or 640
wp-config.php — 600

WordPress error 403: Access denied

First of all, back up your site and database. Then you need to disable all plugins. If that helped, one of your plugins was causing the error. Deactivate them one by one to see which one of them was wrong.

A corrupt .htaccess file may also have caused a WordPress 403 error. Find it through an FTP client and delete it. Then try logging in to your site. If the problem is resolved, generate a new .htaccess file. You can do it in the template’s administrative menu in Settings> Permalinks. Just click the Save settings button.

The error could also have occurred due to incorrect file permissions. Therefore, you must check them. I described this step in the previous section.

Fixing the problem: This page contains a malicious program

Google identifies sites containing malware or suspicious codes. This may be because your site has been hacked and really contains malicious code. The second reason may be that the malicious code is contained by a third party. For example, the page that you have a link to because of an advertisement.

WordPress error: Missed Schedule Post Error

missed-schedule-post

WordPress lets you pre-schedule when you publish your posts. The process then happens automatically. If the message about a failed posting appears too often, install and activate the WordPress Missed Schedule Post plugin. The plugin looks for dropped posts and publishes them on the site.

Error 28

This error applies to hosting. To resolve this issue, contact your hosting provider. One of the following situations may have occurred:

  • You have too many files in /tmp.
  • You have full cache on your server.

Constant logging out

To identify your login, WordPress stores cookies. You must have the same URL set in the website address and WordPress address of your website. In the administrative menu, go to Settings »General and make sure that both names are the same. If you don’t have access to administration, do it via FTP.

Find the wp-config.php file. Download it and open it in a text editor. You can use a notepad. Add the following code above the line saying: “That’s all, stop editing! Happy blogging”:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

The most common WordPress errors and their solution – summary

Many mistakes can be avoided by using high-quality components – themes and plugins. I recommend betting on proven multi-functional themes – Divi and Avada. I also have great experience with StudioPress themes.

💡 Tip: Choosing the right hosting is crucial for a fast website ⏱ . I recommend betting on verified quality ➡️ Bluehost or SiteGround.
Was this article helpful for you? Support me by sharing, please. 👍

LEAVE A REPLY

Please enter your comment!
Please enter your name here
I agree with the processing of personal data.