When a WordPress site breaks, changing several settings at once can make the cause harder to find. A safer approach is to document the symptom, protect the site with a backup, test one likely cause at a time, and confirm that the repair has not affected other parts of the website.
This guide covers a practical troubleshooting process for plugin conflicts, critical errors, database connection failures, REST API problems, slow pages, and possible security incidents. It is useful for site owners, freelancers, agencies, WooCommerce managers, and developers.
For broader troubleshooting and development support, see this WordPress site help guide.
Begin With a Safe WordPress Fix Workflow
Start by recording what is happening. Note the affected URL, the action that triggers the problem, the exact error message, recent changes, and whether the issue affects visitors, logged-in users, mobile devices, or the entire site.
Create or confirm a backup
Make a fresh backup of the WordPress files and database before editing code, updating extensions, or changing server settings. A backup is only useful if it can be restored, so confirm that the backup completed successfully and that your host or backup tool provides a workable restore process.
For cPanel hosting, follow a structured process for saving the site files and MySQL database. This guide explains how to create and restore a WordPress backup with cPanel.
Check what changed recently
Look for a plugin or theme update, PHP version change, new caching rule, hosting migration, expired credential, or recently added custom code. If the site worked before one specific change, test that change first.
Avoid updating every plugin at once during diagnosis. Doing so may remove the clues that identify the original cause.
Resolve Plugin and Theme Conflicts
Plugin conflicts can involve another plugin, the active theme, WordPress core, a page builder, WooCommerce, or the server’s PHP version. The most useful test is to isolate the components involved.
If the dashboard is available, deactivate plugins individually and test the affected page after each change. If you cannot log in, use your host’s file manager or SFTP to rename wp-content/plugins temporarily. WordPress will generally deactivate the plugins when the directory is unavailable.
Restore the directory’s original name after testing, then reactivate the plugins one at a time. This helps identify the extension that triggers the problem. Do not leave unrelated plugins disabled without checking whether the site relies on them.
Temporarily switching to a default WordPress theme can show whether the active theme is involved. Test this on staging whenever possible, especially on a WooCommerce store where theme changes can affect product, cart, and checkout templates.
For better extension management, review how to choose, install, troubleshoot, and manage WordPress plugins.
Repair a White Screen or Critical Error
A blank page or the message “There has been a critical error on this website” commonly indicates a PHP fatal error, exhausted memory, incompatible code, or an interrupted update.
Enable logging without displaying technical details to visitors. Add the following lines to wp-config.php, above the line that says “That’s all, stop editing”:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reproduce the error, then inspect wp-content/debug.log. The entry may identify the plugin, theme, file, and line responsible. Disable or roll back the relevant component, then install an updated version from a trusted source if one is available.
Remove or disable these debugging settings after testing on a live site. Displaying PHP errors publicly can expose file paths and other technical information.
If the log reports memory exhaustion, raising the WordPress memory limit may provide temporary room, but it does not replace investigating inefficient code or a faulty extension. See the guide to fixing the WordPress allowed memory size exhausted error.
Fix Database Connection and REST API Problems
Database connection errors
“Error establishing a database connection” can be caused by incorrect credentials, a missing database, a database server outage, insufficient hosting resources, or damaged tables.
Check the database name, username, password, and host in wp-config.php. Keep those values private. Ask your hosting provider whether the database server is running and whether the account still has permission to access the database. If the credentials appear correct, review server logs and database health before attempting a repair.
Use this database connection troubleshooting guide for a more detailed checklist.
REST API errors
REST API failures can affect the block editor, page builders, WooCommerce features, and external integrations. Test the endpoint under Tools > Site Health, then investigate security plugins, firewall rules, permalink settings, authentication, and server-level blocking.
Saving the permalink structure again under Settings > Permalinks refreshes rewrite rules without requiring a new structure. If the issue continues, inspect browser developer tools and server logs instead of repeatedly changing plugin settings. The REST API error guide covers endpoint-specific checks.
Diagnose and Improve Slow WordPress Pages
Measure before optimizing. Test a representative page while logged out, then compare it with dynamic areas such as a product page, cart, or checkout if the site uses WooCommerce.
Investigate oversized images, excessive scripts, slow database queries, third-party services, limited hosting resources, and caching configuration. Running multiple caching plugins with overlapping features can create conflicts, so understand what each tool is doing before adding another.
Update PHP, WordPress, plugins, and themes only after checking compatibility and creating a backup. A staging copy is the safest place to test these changes.
A 502 error during traffic spikes or resource-heavy operations may involve PHP-FPM limits, server capacity, or plugin behavior. Use the 502 Bad Gateway troubleshooting guide to narrow down the cause.
Check Security After a WordPress Failure
Not every unexpected change is a software conflict. Malware, unauthorized edits, and compromised administrator accounts can also cause errors or redirects.
Look for unfamiliar users, unexpected administrator permissions, modified plugin or theme files, suspicious scheduled tasks, and redirects to unrelated websites. Review access logs and security scan results where available.
After confirming the scope of the incident, change administrator, hosting, database, and SFTP passwords. Use unique passwords and enable two-factor authentication where available. Update WordPress components from trusted sources, remove unused extensions, and review administrator access regularly.
Do not immediately delete suspicious files if you may need them for analysis. Preserve a backup first, then consider professional malware cleanup or hosting support when the compromise is extensive.
When to Hire a WordPress Developer
Professional assistance is appropriate when the problem involves lost data, payment processing, custom integrations, production WooCommerce orders, server configuration, malware, or code you cannot safely evaluate.
It is also worth getting help when temporary fixes keep failing. Repeated errors may point to an architectural problem, an outdated custom integration, inadequate hosting resources, or poorly maintained extensions.
A developer can document the diagnosis, repair custom PHP or database issues, review APIs and hosting configuration, and test the result without relying on guesswork.
WordPress Fix FAQ
What should I do first when WordPress breaks?
Record the exact error, identify recent changes, create or confirm a backup, and test the most likely cause with as little impact on visitors as possible.
Can disabling all plugins fix WordPress?
Disabling plugins is a useful diagnostic test, not a complete repair. Reactivate them individually to find the conflict, then update, replace, or reconfigure the extension responsible.
Should I edit WordPress core files?
No. Core edits can be overwritten by updates and may create compatibility or security problems. Use a child theme, custom plugin, or properly managed code change instead.
How can I tell whether the problem is caused by hosting?
Hosting is more likely when several sites on the account fail, database connections time out, server resources are exhausted, or PHP and web-server logs show infrastructure errors. Your host can confirm service and resource conditions.
Conclusion
A dependable WordPress fix is a controlled process: protect the site, reproduce the problem, check recent changes, isolate one cause at a time, review logs, and verify the result. Reliable backups and a staging environment make future repairs safer and easier to repeat.
For complex failures, custom integrations, WooCommerce issues, security reviews, or ongoing maintenance, a documented diagnosis is usually more valuable than a quick workaround.
