Magda
9 min
April 25, 2025

The most common WordPress errors and how to fix them - a guide for site owners

WordPress is undoubtedly the most popular content management system in the world. It owes its popularity primarily to its ease of use, flexibility and huge community. But even the best-designed CMS is not free of errors. In this article, you'll learn about the most common problems WordPress users face, and how to solve them effectively - without stress or panic.

Read more
The most common WordPress errors and how to fix them - a guide for site owners
Schedule a free consultation

    We process your data in accordance with our privacy policy.

    1. Error connecting to a database

    It happens that you go to your website and all you see is the message ‘Error establishing a database connection’. This is a classic. This error means that WordPress can’t establish a database connection – and this, in turn, causes your entire site to stop working. The most common cause is an incorrect configuration of the wp-config.php file . This is where the database login details are stored: username, password, host address and the database name itself. A typo or password change without updating the file is enough for everything to stop working. Sometimes the server is also to blame – for example, if the database has been overloaded or is temporarily unavailable.

    The solution? Start by checking the wp-config.php file . You can also contact your hosting’s support department – they are often able to restore the connection or pinpoint the source of the problem. We describe this problem in detail in the article: Database connection error – cause, diagnosis, repair.

    2. White Screen of Death

    Sounds dramatic and… in fact it is. A white page without any error message means that something has gone very wrong. This often happens after a theme or plugin update. WordPress stops displaying content because the PHP code is generating a critical error. One way to diagnose the problem is to enable debug mode. In the wp-config.php file, simply add a line:

    define('WP_DEBUG', true);

    When you refresh the page, you will often see the exact error message. Most often the culprit is one of the plug-ins – so it’s worth deactivating all of them and checking if the problem disappeared. If so – activate them one by one until you find the culprit.

    3. Error 500 – Internal Server Error

    This is one of the most general errors. It can have dozens of causes – from a corrupt .htaccess file , to a faulty theme, to insufficient PHP memory limits.

    Your first step should be to delete the .htaccess file and re-generate it from within your WordPress dashboard (Settings > Direct Links > Save Changes). If this doesn’t help, it’s worth increasing the PHP limits, for example by adding to wp-config.php:

    define(‘WP_MEMORY_LIMIT’, ‘256M’);

    It’s also worth checking the server logs – there you’ll find more information about what exactly triggered the error.

    Need support with WordPress-based projects?
    Need support with WordPress-based projects?
    Need support with WordPress-based projects?
    Write to us!

    4. The website is stuck in maintenance mode

    When updating WordPress, its themes, or plugins, the system automatically activates maintenance mode. This is completely normal – during the update, users see the message: “Briefly unavailable for scheduled maintenance. Check back in a minute.” Usually, this lasts only a few seconds and disappears on its own.

    The problem arises when something interrupts the update – for example, the server is too slow, the connection is lost, or there is an error in the plugin being updated. In such situations, WordPress does not have time to delete the .maintenancefile, which it creates automatically during the update. As a result, the website gets stuck in maintenance mode permanently – no matter how many times you refresh it.

    Fortunately, the solution is simple. Simply log in to the server – preferably via FTP or the file manager in the hosting panel – and go to the main WordPress directory (where files such as wp-config.phpand the wp-contentfolder are located). There you will find the .maintenancefile. Just delete it. After this operation, the website should immediately return to normal operation.

    After that, it’s a good idea to check if all updates have been completed – sometimes a plugin or theme may not work properly due to an interrupted update. If something is wrong, it’s best to update them manually or restore them from a backup.

    5. Error 404 on pages or posts

    Sometimes, your website’s home page may work perfectly, but when you click on any post or subpage, you get a 404 error – a message saying that the page does not exist. This is usually caused by direct links (permalinks) that have stopped working properly for some reason.

    This problem usually occurs after:

    • migrating the website to another server or domain,
    • restoring a backup,
    • manually editing the .htaccess file,
    • changing the link structure in the settings.

    Solution? The simplest and most effective way is to resave the direct link settings:

    1. Log in to your WordPress dashboard.

    2. Go to Settings > Permalinks.

    3. Click the “Save Changes” button, even if you haven’t changed anything.

    WordPress will automatically generate a new .htaccess file, which should fix the problem.

    If that doesn’t help, make sure your server supports mod_rewrite (for Apache) and that the .htaccessfile has the correct permissions (e.g., 644). As a last resort, you can also try manually adding the standard WordPress .htaccesscode – you can find it in the documentation.

    6. Syntax error in PHP code (Parse error)

    This error usually appears after manually editing theme files, plugins, or WordPress itself. All it takes is a small mistake – a missing semicolon, a misplaced bracket, a typo in a function name – and the page stops working, and you see a message like this: Parse error: syntax error, unexpected…

    This message usually includes the file name and line number where the error occurred – this is a valuable clue as to where to look for the problem.

    The most common causes of syntax errors:

    • missing semicolon (;) at the end of a statement,
    • unclosed parenthesis () or brace (),
    • incorrect syntax of conditions (if, foreach, etc.),
    • incorrect use of functions or keywords,
    • copying code from the internet without checking it for correctness.

    The solution? Here’s a step-by-step guide:

    1. Identify the file and line of the error based on the message.

    2. Log in via FTP or the file manager in your hosting panel.

    3. Open the file and check the indicated line – it is also worth looking at a few lines before it.

    4. Correct the error or, if you do not know what you have changed, restore the previous version of the file from a backup.

    If access to the WordPress dashboard is blocked by an error, you can also temporarily deactivate the theme or plugin by renaming their folder (e.g. twentytwentyone → twentytwentyone_old). This will restore access to the panel and allow you to make further repairs.

    For safety reasons, it is always a good idea to make a backup before manually editing files. And if you don’t feel confident with PHP code, use an editor with syntax hints (e.g., VS Code) or ask someone more technical for help. Check out our article: Updating PHP in WordPress.

    7. Maximum script execution time exceeded

    When installing a plugin, importing large amounts of data, or migrating a website, you may see the error: Maximum execution time exceeded. This means that the server has stopped the script because it took too long to execute.

    You can fix this by adding the following line to the .htaccess file:

    php_value max_execution_time 300

    Or by editing php.ini and increasing max_execution_time. If you do not have access – contact your hosting.

    8. Mixed Content Error

    After switching to HTTPS, some resources (e.g., images) may still be loaded via HTTP. Browsers block such elements, which may cause the page to display incorrectly.

    The solution is to change all internal links to the HTTPS version. This can be done manually, but it is much faster to use a plugin such as Better Search Replace or Really Simple SSL.

    9. Failed automatic updates

    Automatic updates of WordPress and its components are a great feature, but sometimes they fail. Most often this is due to too short execution time or permission errors.

    In this case, it is best to perform the update manually: download the latest version of WordPress from the official website and overwrite the files on the server – except for the wp-content directory and the wp-config.php file. This allows you to keep your data and configuration.

    10. WordPress does not send emails

    No messages from the contact form, no password reset or notifications – this is a common problem. The default wp_mail() function often does not work on cheaper hosting services that block emails from PHP.

    The solution is to configure SMTP – you can do this, for example, with the WP Mail SMTP plugin. This requires you to provide your SMTP server details (e.g., Gmail, Sendinblue, or Mailgun), but it guarantees that your messages will be delivered.

    11. File too large when importing or uploading media

    If you are trying to upload a large file, such as a movie or backup file, you may see a message that the limit has been exceeded.

    In this case, it is worth editing the PHP settings and increasing the values of upload_max_filesizepost_max_size, and memory_limit. You can do this in the php.ini.htaccess, or directly in wp-config.php.

    12. Redirect loop

    When your website won’t load and your browser reports a redirect error, the problem is usually caused by incorrectly set website addresses (WordPress Address and Site Address). Sometimes an SEO plugin is also to blame.

    Check if the addresses in the panel match the actual ones (e.g., https:// if you have an SSL certificate). If necessary, force them in wp-config.php:

    define('WP_HOME','https://twojadomena.pl');
    define('WP_SITEURL','https://twojadomena.pl');

    13. The website has been hacked

    There is nothing worse than when your website starts redirecting users to suspicious sites and Google marks it as unsafe. Most often, attacks result from outdated plugins or themes, lack of security, and weak passwords.

    First, scan your website – for example, using the Sucuri tool or the Wordfence plugin. If it is infected, delete the infected files, restore a backup, and change all passwords (for WordPress, FTP, and databases). For the future, consider installing a firewall, limiting logins, and setting up automatic WordPress backups.

    Summary

    Although WordPress is user-friendly and intuitive, errors are an integral part of it – especially with a large number of plugins and frequent changes. The key to peace of mind is knowledge, quick response, and regular backups.

    Connected articles
    See all
    Discover more topics