ORC Webhosting GmbH Landquart/Switzerland

The 10 most common WordPress errors and how to fix them

Introduction

WordPress is a reliable CMS in itself. After all, there are good reasons why most bloggers manage their web presence with WordPress. However, although the developers are constantly improving the system, error messages occasionally occur in the application. So that you can continue working on your website as quickly as possible in such cases, we will show you solutions for the 10 most common WordPress errors.

1.WordPress shows only a blank page now

This display error is known to many WordPress users: If instead of the own website suddenly only a white page is displayed, one often speaks somewhat exaggeratedly of the "White Screen of Death". Many bloggers are unsettled when they are confronted with this error for the first time, after all, the entire page seems to have dissolved into nothing. However, most of the time the cause of this and other WordPress errors can be found and fixed quickly.

There are several possible causes of White Screen of Death: malfunctioning plugins, problems with PHP and various coding or database errors. Therefore, it is advisable to find out the exact cause of White Screen of Death. When WordPress is not working properly, sometimes a blank screen appears instead of your website. Nothing seems to work anymore. Often it is enough to fix a small error so that everything is displayed normally again.

Possible WordPress error 1: Plug-ins

If there is anything good to report about the White Screen of Death, it is this: The name of this WordPress error sounds more dramatic than it is. Very often it is enough to disable a plugin and everything will be displayed correctly again. Because often the White Screen of Death is due to one of the following actions:

  1. You have a Plugin activated in WordPresswhich does not function correctly.
  2. You may have changed the settings of an active plugin.
  3. You have changed the backend code of an active plugin.

If you have recently made any of these three changes, simply go to the plugin page in WordPress and disable the plugin that you last changed. In many cases, this will already fix the problem. After deactivating the plugin, your website should ideally display correctly again. If you changed the backend code of a plugin before the display error and want to use that plugin again, you need to do the following: Delete the plugin from your WordPress directory and upload an original, unchanged version of the same plugin from the WordPress plugin directory.

However, there are cases when you cannot disable the plugin in this way, because the WordPress dashboard is not visible. In this case, it is not possible to make changes in the WordPress menu.

In this case, you will need to use a File Transfer Protocol (FTP) client to access your WordPress files and delete or disable the changed plugin. If you have never used an FTP client to make changes to your WordPress installation, you can rest easy: It's easy to learn how to use, and many FTP clients are available for free. You can also use the file manager in cPanel if you don't have an FTP client.

You can learn how to use the file manager here: How do I use the file manager?

After you install your FTP client, log in with the credentials you received. Then remove the problematic plugin by following the instructions below, and you will get rid of White Screen of Death.

  1. Open the directory where your WordPress files are located.
  2. Open the "wp-content" folder.
  3. In the "wp-content" folder you will find the "plugins" folder.
  4. Open the "plugins" folder and locate the plugin you were working on before the display error occurred.
  5. Delete the plug-in. You may need to highlight the plugin and right-click on it to find an option to delete it from your WordPress installation. If you do not want to delete the plugin, you should rename the folder where the plugin is located.
  6. Return to your browser and refresh your website. The white screen should disappear and you can log in to WordPress again.

Always remember to use only plugins that are actively supported by the respective developer. The plugins should also be compatible with the latest version of WordPress. Outdated plugins can quickly lead to problems.

Possible WordPress error 2: Code error

If the error is not due to a plugin, it is also possible that you have changed the "function.php" file or another PHP file via the WordPress Theme Editor have changed.

The following error message may also appear on the screen:

Parse error: syntax error, unexpected $ end in /home/name/public_html/wordpress/wp-content/themes/your_theme/functions.php on line 231

This means that there is an error in the code. The selected WordPress theme (which determines the layout and design of the page) cannot be displayed correctly. In this case, you need to restore the original state of the file.

The problem is, of course, that quick access to the file is not possible, because instead of the WordPress theme editor only a white screen is displayed. The best way to fix this problem is the following: re-upload the broken file in the WordPress folder with your FTP client and replace it.

After you have logged in to your server, do the following:

  1. Open the directory where your WordPress files are located.
  2. Open the wp-content folder.
  3. The "wp-content" folder contains the theme folder.
  4. Open the Theme folder and locate the folder for your current WordPress theme.
  5. Open the folder for your current WordPress theme and make sure that the functions.php file is in the folder.
  6. Now upload a working version of the functions.php file. This can be a copy of the file you saved on your hard drive before you changed it. You can also use the original version from your theme.
  7. If you do not want to overwrite the file, do the following: Rename the folder of your current theme. This will disable it and the default WordPress theme will be used again. This makes it possible to manually remove the incorrect code from the functions.php file in the inactive theme.
  8. If you have decided to replace the non-working functions.php file with a working version and your FTP client asks you if you want to overwrite functions.php, answer Yes.
  9. Return to your browser and refresh the website. Ideally, the "White Screen of Death" is now gone and regular login is possible again.

You can also test using a different theme instead of changing the parent functions.php file. This way, you can make changes to your theme without changing the code.

It is always worth making a separate backup copy of your modified theme before making any changes. This will ensure that the operation described above can still be performed in the event of a "White Screen of Death".

Unknown error source

Sometimes, for some inexplicable reason, a white screen appears: you haven't changed your plugins or rewritten your theme's code. You call your URL and instead of your website you only see a white screen. But how to fix this WordPress error if there is no obvious cause?

In such situations WP_DEBUG helps: Using the WP_DEBUG error messages, faulty files can be easily identified. Simply remove, change or overwrite these files. Your website will remain fully functional. But even without WP_DEBUG there are ways to rid your website of errors.

Due to the complexity of many WordPress plugins, there is a high chance that unknown errors can be traced back to a plugin. Maybe one of your plugins is outdated or a recently installed update is not compatible with your WordPress backend. If you have such a suspicion, you should deactivate all your plugins and reactivate them one by one to find out step by step which plugin is causing the problem.

Log in to your website's server using the FTP client. Then follow these steps to identify the faulty plugin step by step:

  1. Navigate to the directory where your WordPress files are located.
  2. Open the "wp-content" folder.
  3. In the "wp-content" folder you will find the "plugins" folder.
  4. Rename the plugins folder. This will automatically disable all plugins. The name of the folder can be freely chosen, but it must be recognizable later.
  5. Go to your WordPress dashboard. If the white screen has disappeared and you can log in, one of the plugins has caused the error.
  6. Rename the renamed folder back to "plugins". Now all your plugins should be listed on the corresponding page in WordPress - but they are now inactive. Activate them one by one again. If the screen turns white again after activating a particular plugin, you know which plugin is responsible.
  7. Return to your FTP client and delete the problematic plugin.

If your website still displays white after these steps, the problem could be related to one of the installed themes. In this case, perform the same procedure with your theme folder: Rename the theme folder and gradually reactivate all your themes until you see a white screen again.

Apart from plugins, other causes for display errors can of course also come into question, which are not obvious at first glance:

  1. Caching: You may be using a caching plugin to improve WordPress loading times. If this is the case and you still see a blank screen despite following the steps above, you may just need to clear your site's cache. If you can't clear the cache because you still can't access WordPress, clear the cache of your browser.
  2. Corrupted file(s): It is possible that your WordPress files are corrupted (e.g. by malware). Contact your web host and ask them to diagnose the problem.
  3. Server down: check your email inbox. Many hosting providers notify their customers when the servers are down. If you haven't received a message from your web host, call their customer support. There might be a server problem that your provider has not diagnosed yet.

The last option to fix the "White Screen of Death" is to restore it completely with a backup.

2. internal server error: 500 Internal Server Error

The error message "500 Internal Server Error" can hit website owners in general - not only with WordPress. Fortunately, the cause is found quickly in most cases. With WordPress, plugins and/or problems with themes are often the cause of server errors. Other possible causes of internal server errors in WordPress are corrupted .htaccess files or insufficient PHP memory. Internal server errors can also affect the WordPress admin page while the rest of the site is working fine.

wordpress errors and solutions

Possible WordPress error 1: Corrupted .htaccess file

The most common cause of the error message "500 Internal Server Error" is a corrupted .htaccess file. Therefore, if you receive such an error message, you should check this file first: Log in to your server via FTP access. Navigate to the root directory of WordPress and locate the .htaccess file. Temporarily rename this file. Now reload your website. If it works: Congratulations! Now create a new .htaccess file by simply navigating to Settings → Permalinks in your WP admin panel and save the settings again.

Possible WordPress error 2: Insufficient PHP memory

Sometimes PHP memory limits also cause an Internal Server Error 500. To determine if this is the reason for the error, you should check the error_log of your website. Enable wp_debug and check the error log. Open the wp-config.php file and look for the following line of code:

Define ('WP_DEBUG', false);

Change them as follows:

Define ('WP_DEBUG', true);

Again, it is recommended to deactivate the plugins and themes one after the other, since an internal server error can also be caused by faulty plugins or themes. Alternatively, increasing the PHP memory volume can often fix the error.

Possible WordPress error 3: Core file corrupted

It doesn't happen often, but occasionally a corrupted WordPress core file will cause an internal server error to be reported. In this case, you should upload a new core file set to eliminate the source of the error.

Log in to your site via FTP and create a new wp-admin folder and a new wp-includes folder. Changes in these folders should not affect your personal customizations for WordPress, unless you have modified files stored in these folders - which is usually not the case. The files in the wp-content folder contain your theme, plugins, and other modifications. You must not update this folder, otherwise you will delete the content of your website.

If all else fails, you will need to download a new copy of WordPress from the official website and reinstall it completely.

3. error establishing a connection to the database: Error establishing a database connection

If you are an experienced WordPress user, you can probably fix this WordPress error quickly. But for beginners, "Error establishing a database connection" can be a confusing error message.

Error establishing a connection to the database: Error establishing a database connection

This error occurs, for example, when you install WordPress manually or when you try to upload your own website. Of all the PHP files in WordPress, wp-config.php is the most important, because without this file you can't connect to the database and your website won't work. In this file you set your connection information like database name, username, password and host.

Possible WordPress error 1: Incorrect connection settings

If an error occurs when creating the database connection, it is usually due to incorrect database connection settings in the wp-config.php file. If you are moving a website from an old hosting provider, you need to make a change there. Update the database name, database username and database password in your wp-config.php so that your database works correctly.

Possible WordPress error 2: WordPress website move error

Another common source of errors is moving your WordPress files to a new hosting provider. Initially, the website will still be displayed when you go to the URL. However, once your old hosting provider has finally terminated your contract and you have not yet moved your database to the new provider's server, your website will no longer be displayed. You will receive the error message "Error establishing database connection".

The best way to avoid this error is to transfer the entire database to your new host immediately. Update your wp-config.php to access the new database. This way you can safely terminate your old hosting account without losing any data and without receiving the dreaded "Error connecting to database" message.

Before you start troubleshooting, make sure you have a backup copy of your database by exporting your SQL file.

Possible WordPress error 3: Faulty wp-config.php file

You forgot to update the wp-config.php file when you changed the password for the database.

You should change your database password more frequently to protect your database. Please note that you need to change the password both in your Hosting Control Panel and in your wp-config.php file. Download your wp-config.php file, open a text editor and edit the following line:

Define ('DB_PASSWORD', 'Insert password here');

Add your new password, save the wp-config.php file and upload it via FTP. Restart the browser and check if your website loads completely.

Possible WordPress error 4: You have entered your database information incorrectly

Sometimes typos creep in, and even a small typo can bring down an entire website. A wrong underscore or number in your database name, username or password is enough to prevent access to your website.

Most WordPress installations are carried out via the Hosting Control Panel with the help of a wizard. However, some users prefer a manual installation. If you install WordPress without an automatic wizard, you will also need to create your database manually. Be sure to enter the database name, username and password correctly. To be completely safe, you should use the copy & paste method.

However, when copying, make sure that you only copy the text that you actually need. Be careful not to copy spaces, as WordPress interprets them as characters. Therefore, spaces will cause errors when the installer tries to connect to your database. Also, make sure you enter the information in the correct field during installation.

Possible WordPress Error 5: Problems with DB_HOST when transferring a WordPress website to a new host

After you have updated your wp-config.php file to access your database at your new hosting provider, you may need to change the DB_HOST value.

This problem is less common, but it can still occur. Some hosting companies use their own values when defining the DB_HOST parameter in wp-config, but this is not always the case. Other hosts define a URL to the MySQL database server, and that URL must be used as the value for DB_HOST. Sometimes it also works if you enter the hosting IP address instead of the MySQL URL.

Possible WordPress error 6: Your database is corrupted

This error is not identical to "Error establishing database connection", but it is related to it. Sometimes the front end of your website works fine, but you still get an error message. One or more database tables are not available and the database may need to be repaired.

Open your wp-config.php file and go to the section that defines your database name, username, password and host. Under Host you define the following:

Define ('WP_ALLOW_REPAIR', true);

Now save your wp-config.php and upload it via FTP. Call the following URL:

https: //www. Your-Page.ch/wp-admin/maint/repair.php

On this page you will see two options. The first option is the "Repair Database" button and the second option is the "Repair and Optimize Database" button. At this point you should once again make sure that you have made a full backup of your database.

Click on the "Repair Database" option and open a new tab in your browser after the repair process is complete. Now check if your website is displayed without any errors.

4. connection time expired: Connection timed out

This error message usually occurs when the website's server is overloaded and cannot process your browser's request. Another possible scenario is a poorly configured server. The Connection timed out error message appears when your website sends more requests to the server than it can handle.

Possible WordPress error 1: Faulty plugins

First, disable your plug-ins. If this solves the problem, re-enable the plug-ins one by one. Using this method, you can also find out which plugin is causing the problem in this case. Alternatively, you can replace your current theme with the default WordPress theme.

Possible WordPress error 2: PHP memory limit reached

Another possible source of error is the PHP memory limit. In this case, increase the limit in the wp-config.php file. Open the file and add the following line of code:

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

This line increases the memory limit to 64 MB. Note, however, that with shared hosting you can increase your storage limit only up to a certain limit. If you need more memory, you'll have to contact your web host to have them increase the limit for you. Note that many shared hosting providers keep the PHP memory limit very low.

If you have access to your php.ini file, you can also increase the maximum execution time. In the file, scroll to the line with the max_execution_time option. Set the value to zero to completely remove the PHP execution time limit, or set any other value.

Possible WordPress error 3: The 404 error

Another common cause of an error message is the so-called 404 error. In this case, the website tries to load a file that does not exist. This can slow down your website and cause a timeout.

Possible WordPress error 4: Faulty cookie

This WordPress error may occur if you are not yet familiar with using an .htaccess file. In extremely rare cases, this WordPress error occurs when your browser stores a bad cookie. Although this is rare, it is always a good idea to clear your browser cache and reload the page to rule out this error cause.

5. WordPress does not save changes

You have just changed the theme or created a new entry, reload your website - but no change is visible. In most cases, there is a simple solution to this problem: your web browser must completely reload the page from the server. A web browser stores copies of websites in the cache or memory of your computer. When you visit the website later, the web browser accesses the cached copy, which makes the website load faster.

When your web browser loads a saved copy of the page from the cache, your latest changes are not displayed because it is an outdated copy. To completely reload the page, for example, in Firefox you need to hold down the Ctrl+Shift key combination and then press the R key. In Chrome, you need to hold down the Ctrl key and then press F5. These key combinations may vary depending on your browser settings.

The problem of not showing changes is also common when using a WordPress hosting package. Many WordPress hosting packages use server-side caching. If you use your provider's WordPress service, it may be a good idea to clear the cache manually. In many cases, your changes will show up immediately after you clear the cache.

If you use an HTTP cache reverse proxy on your web server, changes to your files do not appear immediately. Changes become visible only after some time when the cached version of the cache expires and is reloaded. Set your caching system accordingly to fix this problem.

WordPress does not have a cache by default. However, some WordPress plugins add caching functionality to your WordPress website regardless of your browser settings. This will make your website load faster, as WordPress will fetch your data from the cache. All good cache plugins clear the cache once a post, page or comment has been published. However, if you make other changes, for example to your theme, the cache may not be cleared and the old version may still be displayed. In this case, refer to the plugin's instructions on how to clear the cache.

When you make a change to a file, the new file is initially saved only on your computer. If you can't see any changes, make sure that you actually uploaded the file and moved it to the correct folder. If you overwrite an exactly identical file, the save operation may not complete. To be absolutely sure, you should delete the old version of the file on the host server.

6. persistent maintenance mode after upgrade

It often happens that you need to update a plugin, a theme or maybe your WordPress core files in WordPress. You save your site, perform the update, and then there is an interruption. There is a conflict between the upgrade and your existing plugins, or between the upgrade and your custom code. The result is an internal error message.

If you disable the faulty plugin or custom code, you may enter WordPress maintenance mode. The home page of your website will then display the following message: Maintmode.wpe

The website is obviously in maintenance mode. But what exactly is that? Maintenance mode is a core feature that suspends access to WordPress during updates and installations. When you perform updates, some backend processes need to be paused for a short period of time. WordPress then creates a temporary file to install the updates. Once the process is complete, the file is deleted and the site functions normally again.

It becomes problematic when a conflict with this file occurs. Such a conflict can interrupt the scheduled deletion of the temporary file. The maintenance file then continues to run after the update is complete and the above message appears.

However, if you are familiar with an FTP program, this conflict can be easily resolved. Simply delete the maintenance file directly from the directory:

Log in with your FTP program and change to your root directory (the directory where the wp-config.php file is located). If you can't find the file, it's probably hidden. In your client, select the "Show hidden files" option. Once you find the file, delete it and refresh the client. Then clear your browser's cache and reload the website.

But how can conflicts with the maintenance file be avoided? With these simple steps, many errors can be avoided in advance:

  • Many conflicts arise from ignoring update notices. Install updates as soon as they are available. Check if important updates are recommended on your WordPress admin page.
  • Make sure that all your plugins and themes are compatible with the latest version of WordPress. If this is not the case, check with the plugin or theme developers if and when a new version is planned to be released.
  • Do not perform an update without first creating a backup.

7. syntax error

Even a small typo in the wrong place can cause the entire WordPress site to stop working. However, the error message "Syntax Error" is not an unsolvable problem.

A syntax error is usually caused by a small but crucial error in the syntax of your code. A missing comma or a wrong parenthesis can break the entire script. Have you recently inserted a snippet from the Internet or updated a plugin? If so, you should check here first.

To fix the syntax error, you need to edit the section of code that causes the error. Either remove it entirely or correct the syntax. As a beginner, it's easy to get frustrated when a single error makes your entire website inaccessible. If you inserted the code through the editor section in your WordPress dashboard, you won't be able to access your WordPress code directly. The only way to fix the syntax error then is to directly replace the corrupted code via FTP.

Log in with your FTP program and change to the directory where the theme file you want to edit is located. The error code shows you which file and which line are affected.

Now either remove the newly added code completely or correct the syntax. Once you have removed or edited the code, save the file and upload it to your server. If you then access your WordPress website without a cache, it will usually work properly again.

8. automatic update failed

WordPress offers many great features - and undoubtedly the automatic update feature is a very handy thing for many users. However, WordPress automatic update can sometimes lead to complications.

If you have a recent version of WordPress installed, you don't have to worry about minor and security updates. Most of the time, these updates run automatically in the background. This means that you will receive minor WordPress updates automatically without having to do anything yourself. For bigger updates, like a completely new WordPress version, just click on the "Update Now" button.

Before you update WordPress, you should always backup your WordPress database and all files and folders. If you get the error message "Update failed", you can fix the problem as follows:

Delete the maintenance file

First, delete the maintenance file from your WordPress directory via FTP. If a WordPress update fails, you will need to delete this file to access the WordPress admin page again.

File permissions check

Sometimes WordPress cannot create the upgrade directory due to a permission problem.If you get the error message "Could not create directory", check if your Wp-Content folder has a valid 755 file permission. Alternatively, you can use a 777 permission. However, don't forget to change the permission again once you have solved the problem. Also, with this solution, you should temporarily disable all plugins.

Try to upgrade WordPress again. If you still get the same WordPress error, delete the "upgrade" folder in wp-content, recreate it and use the 777 permission for the same folder. If it works now, remember to change the permission back to 755 to minimize the security risk.

In some cases, you may experience permission problems with your web host. In this case you should use a Support ticket to your web host and try to solve the problem this way.

Add FTP credentials to WordPress config file

If your site has been moved recently or you have changed your FTP password, WordPress may ask you for your FTP credentials in the Dashboard. WordPress may ask for this data on a regular basis, but this can be changed with appropriate settings. Instead of entering the credentials in the dashboard each time, simply add them to the wp-config.php file. However, first make sure that you are using the correct FTP credentials. Check the data in your web hosting Control Panel.

Now open the wp-config.php file in the root directory of your WordPress installation and add some lines. Add the following lines to your wp-config.php file above the line "'/* That's it, stop editing! Have fun blogging. */'":

define('FS_METHOD', 'ftpext');
define('FTP_HOST', 'ftp.website.de');
define('FTP_USER', 'username);
define('FTP_PASS', 'password');

Then enter the appropriate data in the FTP Host, Username and Password fields.

9. problems uploading images in WordPress

Problems uploading images are often due to incorrect file permissions. Your upload directory must have the correct file permissions. Otherwise, WordPress will not be able to store files in it. In some cases, you may also experience problems viewing the files in the upload directory. To set the correct file permissions for your upload directory, you need an FTP client. You may wonder why you suddenly have problems with access rights. Who changed the file access rights?

There are several possible causes of access rights problems. It is possible that your web hosting provider performed an upgrade and changed your file permissions. It is also possible that a hacker made these changes by uploading a backdoor hack. With a poorly configured shared hosting, it is also possible that another user installed a theme or plugin from an untrusted source and this file accidentally changed the script and file permissions for all users.

When everything on your website is working normally again, you just need to normalize your file access rights. If you encounter any difficulties in the process, please contact your hosting provider for assistance.

Log in to your website via FTP client and open the /wp-content/ folder. This folder contains the /uploads/ subfolder. Right-click the upload directory and select File Permissions. The File Permissions dialog opens. First, you need to set the file permissions for the upload directory itself and all subdirectories to 744. To do this, enter 744 in the numeric value field and select the checkbox next to "Recursive to subdirectories". Finally, click on "Click only for directories". Then confirm with OK to apply the changes. Your FTP program will now start the file management for the directories. If setting the directory permissions to 744 does not work, try the numeric value 755.

The next step is to set the file access rights for all files in the upload directory. To do this, right-click the upload directory and select the File Access Rights category. In the Change File Access Rights dialog box, change the numeric value to 644 and select the check box next to Recursive to Subdirectories. Finally, click the Files Only radio button. Click the OK button to apply the changes.

Your FTP program now sets the file permissions for all files. Once you have saved these changes, you should be able to upload images via your WordPress admin page again.

10. sidebar appears under the main content

When this WordPress error occurs, your sidebar is no longer to the left or right of the main content, but below your text. Not only does this look unsightly, but it can also affect the usability of the website. Although this error often makes your layout look unusable, it doesn't mean that you can no longer use your theme. Often the sidebar error can be fixed quickly.

A common cause of this error is too many open or too many closed div tags in your HTML code. Div tags look like this in the code of your WordPress page:

<div> </div>

These tags open or close HTML elements on your website. If there is too much or too little of a div tag in the code, it will not be implemented correctly. This primarily affects the layout. Especially if the problem occurs only in one post or on one page, div tags are probably the cause. The easiest way to check your code for div tag errors is to use an online HTML validator.

However, it is also possible that an error has crept into your style sheet file. This should be considered especially if you have made recent changes to this file. If you've assigned sizes to the main content and sidebar that don't fit next to each other, the CSS won't build your layout properly. Incorrect margin specifications or too much padding can also cause your website to display incorrectly.

Another possibility is that the float properties of your sidebar are disabled, so that the sidebar is no longer aligned to the left or right via CSS. Therefore, also check the float definition to eliminate this source of error.

Register your domain and get started!

Unleash your online potential - register your desired domain and lay the foundation for your digital success!

Register domain
Hat Ihnen diese Anleitung geholfen?