Key takeaways
- Table of Contents
- 500 Internal Server Error
- 404 Page Not Found
You're working on your WordPress site and suddenly, an error appears. White screen, 500 error message, can't connect to the database... These situations are common and stressful, but in the vast majority of cases, they have simple and quick solutions.
This comprehensive guide covers the most common WordPress errors and explains how to resolve them yourself, without needing advanced technical skills.
500 Internal Server Error
The 500 error is one of the most frequent errors on WordPress. It indicates that a server-side problem has occurred, but without providing specific details.
Common causes
- Corrupted .htaccess file
- Defective plugin or in conflict with another
- PHP memory limit exceeded
- Defective theme
- Corrupted WordPress files
Solutions
- Reset the .htaccess file: temporarily rename it and create a new one via Settings > Permalinks
- Disable all plugins via FTP by renaming the
wp-config.phpplugins folder - Enable debug mode in
wp-config.php:define('WP_DEBUG', true); - Reinstall WordPress via the dashboard (Updates > Reinstall)
404 Page Not Found
This error appears when WordPress can't find the requested page. It may appear on all pages or only on certain ones.
Common causes
- Malconfigured permalinks
- Recent migration without URL updates
- Missing or corrupted .htaccess file
- Incorrect redirects
Solutions
- Resave permalinks: Settings > Permalinks > Save Changes
- Check the .htaccess file: make sure it contains the correct rewrite rules
- Use Better Search Replace to update URLs in the database
- Check redirects in your .htaccess file or redirect plugin
Database connection error
This is one of the most critical errors. WordPress can't connect to its database, making the entire site inaccessible.
Common causes
- Incorrect credentials in wp-config.php
- Database server down
- Corrupted database
- Connection limit reached
- Database deleted or renamed
Solutions
- Check wp-config.php: DB_NAME, DB_USER, DB_PASSWORD, DB_HOST
- Contact your host to verify MySQL server status
- Repair the database via phpMyAdmin: select all tables > Repair
- Check user privileges in the database
"The database connection error is often caused by incorrect login credentials. Always start by checking wp-config.php."
White Screen of Death
The white screen is one of the most frustrating errors: the site simply displays a blank page, with no error message. It's a generic symptom that can have many causes.
Common causes
- Plugin or theme conflict
- PHP memory limit reached
- Silent PHP error
- Corrupted file
Solutions
- Enable debug mode in wp-config.php:
define('WP_DEBUG', true);anddefine('WP_DEBUG_LOG', true); - Disable plugins one by one to identify the problematic one
- Change theme temporarily via FTP
- Increase memory limit in wp-config.php:
define('WP_MEMORY_LIMIT', '256M'); - Reinstall WordPress via FTP with a fresh copy
Permanent maintenance mode
WordPress automatically activates maintenance mode during updates. Normally, this mode deactivates by itself. But sometimes it stays stuck and your site displays "Site in maintenance."
Solution rapide
- Connect via FTP
- Delete the
.maintenancefile at the root of your site - Refresh your browser
If the file keeps reappearing, there may be an underlying issue with your WordPress core files or a plugin that's interfering with the update process. In this case, try re-uploading the WordPress core files via FTP or the dashboard.
Why this happens
- Interrupted update (lost connection, server down)
- Conflicting plugin during update
- Incorrect file permissions
Prevention tips
To avoid getting stuck in maintenance mode in the future, ensure you have a stable internet connection before starting updates. If you manage a multisite installation, update each site individually. Also, make sure your server has enough resources (CPU, RAM) to handle the update process without timing out.
PHP syntax error
This error appears when you modify PHP code and make a syntax error. The message typically indicates the file and line concerned.
Solutions
- Identify the file mentioned in the error message
- Fix the syntax or restore the previous version of the file
- Use an editor with syntax highlighting to avoid these errors
- Always save before modifying a PHP file
Memory allocation error
The message "Allowed memory size of X bytes exhausted" means WordPress is trying to use more memory than PHP allows.
Solutions
- Increase memory limit in wp-config.php:
define('WP_MEMORY_LIMIT', '256M'); - Edit php.ini:
memory_limit = 256M - Contact your host if the limit can't be modified
- Optimize your site: reduce number of plugins and optimize queries
Media upload error
This error can occur when you try to upload images or files through the WordPress dashboard.
Common causes
- Incorrect permissions on the
wp-content/uploadsfolder - Upload size limit reached
- Insufficient disk space
- Unauthorized file type
Solutions
- Check permissions: the uploads folder must be writable (755 or 775)
- Increase upload limit in php.ini or via .htaccess
- Check disk space on your hosting
- Check allowed file types in media settings
Can't login to admin
You can no longer access your WordPress dashboard, even with the correct credentials. This can be caused by a plugin conflict, a recent theme change, a corrupted user session, or a security plugin that's blocking your IP address after too many failed attempts.
Quick diagnostic steps
First, try accessing the login page from an incognito or private browser window. If that works, the issue is likely with your browser cookies. If not, the problem is server-side and you'll need to proceed with the solutions below.
Solutions
- Reset your password via phpMyAdmin (wp_users table)
- Use "Forgot password" on the login page
- Disable security plugins temporarily via FTP
- Check cookies in your browser
- Temporarily add
define('DISALLOW_FILE_EDIT', false);in wp-config.php
Mixed content warning
You've enabled SSL, but your site shows a "Not secure" warning in the address bar. This means some resources (images, scripts, stylesheets) are still loaded via HTTP. Google Chrome now flags all HTTP pages as "Not secure," which can damage visitor trust and hurt your SEO rankings.
How to identify mixed content
Open your browser's developer tools (F12), go to the Console tab, and look for warnings about "mixed content." The browser will tell you exactly which resources are loaded over HTTP. You can also use online tools like MixContentSecurity to scan your entire site for mixed content issues.
Solutions
- Install Really Simple SSL to automatically resolve most issues
- Use Better Search Replace to replace HTTP URLs with HTTPS in the database
- Check your theme: some hardcoded URLs need updating
- Check embedded content (iframes, external scripts)
RSS feed error
Your RSS feed displays an XML error, often caused by spaces or line breaks before the opening XML tag. This is a common issue that affects your RSS subscribers and can break integrations with services like Mailchimp, Feedly, or other RSS-based tools.
Why this happens
The most common cause is invisible characters (spaces, line breaks, or BOM markers) that appear before the <?php opening tag in your theme's functions.php file or in a plugin file. When these characters are sent to the browser before the XML declaration, the RSS parser rejects the feed because the XML is no longer valid.
Solutions
- Check your theme's functions.php: it must not contain spaces before
<?php - Disable recently installed plugins
- Use an RSS validator like W3C Feed Validation Service
"Headers already sent" error
This error indicates that content was sent before the HTTP headers, violating the protocol.
Solutions
- Check wp-config.php: it must not contain spaces or invisible characters before
<?php - Check recent plugins: some poorly coded plugins can cause this error
- Check functions.php and header.php files
When to call a professional
While most WordPress errors can be resolved by yourself, some situations require expert intervention. Knowing when to call a professional can save you hours of frustration and prevent further damage to your site.
Warning signs you need professional help
- You've tried multiple solutions and the problem persists
- You suspect a hack but can't identify the source
- Your site's performance has dropped dramatically without obvious cause
- You're about to make changes to a live production site with important traffic
- You don't have time to learn the technical details of WordPress troubleshooting
Situations requiring a professional
- Hacked site: a professional can identify and remove malicious code
- Persistent errors despite resolution attempts
- Data loss: recovery of deleted content
- Complex performance problems
- Technical migration to a new host
- Incompatibilities between plugins and themes
A professional can also help you implement preventive measures: security hardening, performance optimization, and setting up automated monitoring to catch issues before they become critical. Investing in professional WordPress maintenance is often much cheaper than dealing with the aftermath of a major problem.
At WpDefender, we diagnose and resolve all kinds of WordPress problems. Our team intervenes quickly to get your site back in working order.
Is your WordPress site having a problem?
Our team of experts diagnoses and resolves your problem quickly. Free quote for any intervention.
Related articles: 15 optimizations to speed up WordPress | Migration without downtime | Why update PHP