Karachi, Pakistan Mon–Sat: 10AM–7PM PKT
Home Services
Design & Development
UI/UX Design Web Development WordPress Development Responsive Web Design Corporate Website Landing Pages / Microsites E-Commerce Solutions Mobile App Development
Marketing & Growth
SEO Services Content Marketing Social Media Marketing PPC / Google Ads Branding & Creative Speed & Performance
Hosting & Support
Web Hosting Maintenance & Support
Portfolio
Website Design Logo & Graphics
Clients About Blog Free Tools Get a Quote
Hosting & Care Guide

"There Has Been a Critical Error on This Website": How to Fix It

Fix the WordPress critical error using recovery mode, the debug log, disabling plugins or themes, raising the memory limit, fixing PHP versions and reinstalling core.

WordPress critical error message on a website

"There has been a critical error on this website" means PHP hit a fatal error and WordPress stopped loading the page. It is almost always caused by a plugin or theme (often right after an update), a PHP version mismatch, running out of memory, or corrupted core files. WordPress usually emails the admin a recovery mode link that names the faulty plugin. If you do not get the email, you can find the cause in the debug log and disable the culprit through File Manager. This guide shows the exact steps.

Key takeaways
  • Check the admin email inbox (and spam) for "Your Site is Experiencing a Technical Issue". It contains a recovery link.
  • Turn on WP_DEBUG_LOG to see the exact file and line causing the error.
  • Disable a plugin by renaming its folder in wp-content/plugins.
  • Restore a backup if you cannot find the cause quickly, then fix on staging.

Step 1: Use recovery mode

Since WordPress 5.2, the site sends an email to the admin address with the subject "Your Site is Experiencing a Technical Issue". It names the plugin or theme and contains a special login link. Click it, log in, and WordPress lets you into the dashboard with the faulty extension paused, so you can deactivate, update or replace it. Also, this matters for WordPress critical error on every kind of site.

Step 2: Turn on the debug log

Edit wp-config.php in File Manager or via SFTP and add, above /* That's all, stop editing! */: So keep this in mind whenever you work on WordPress critical error.

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

Reload the broken page, then open wp-content/debug.log. Look for a line starting with PHP Fatal error:

PHP Fatal error:  Uncaught Error: Call to undefined function create_function()
in /home/user/public_html/wp-content/plugins/old-slider/slider.php:42

The path tells you the culprit: here, the old-slider plugin. When you finish, set WP_DEBUG back to false and delete debug.log, because it can expose server paths.

Step 3: Disable the faulty plugin

Without dashboard access:

  1. Open wp-content/plugins in File Manager.
  2. Rename the plugin's folder, for example old-slider to old-slider-off. WordPress deactivates it automatically.
  3. If you do not know which plugin, rename the whole plugins folder to plugins-off, check the site loads, rename it back, then disable plugins one by one.

With WP-CLI over SSH:

wp plugin list --status=active
wp plugin deactivate old-slider
wp plugin deactivate --all   # last resort

Step 4: Check the theme

If the log points to wp-content/themes/your-theme/, switch to a default theme. Rename the active theme's folder; WordPress falls back to an installed default theme such as Twenty Twenty-Five (make sure one is installed). Or run wp theme activate twentytwentyfive. Errors in functions.php after a code snippet was added are a very common cause; undo the last edit.

Step 5: Memory limit errors

If the log says Allowed memory size of 134217728 bytes exhausted, PHP ran out of memory. Increase the limit in wp-config.php:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // admin tasks

The server's own memory_limit in the PHP settings must be at least this high. If memory keeps running out, a plugin may be leaking memory, or the site needs better hosting; see our hosting comparison.

Step 6: PHP version problems

If the error started after your host changed the PHP version, errors such as Call to undefined function or TypeError usually mean old code. Temporarily switch back to the previous PHP version in your hosting panel, then update or replace the plugin. Our PHP update guide explains the safe process.

Step 7: Reinstall core files

If the error points to wp-includes or wp-admin, core files may be corrupted or modified (sometimes by malware). Reinstall core without touching content:

wp core verify-checksums
wp core download --force --skip-content

Or in the dashboard: Dashboard → Updates → Re-install. If files were modified unexpectedly, scan for malware; see our security hardening guide.

Step 8: Restore a backup

If the site is a business-critical store and the fix is not obvious, restore the most recent backup to get it online, then reproduce and fix the problem on a staging copy. Note any orders or form entries received since the backup.

WordPress critical error: how to prevent it

  • Update plugins in small batches, and test major updates on staging.
  • Keep daily backups with one-click restore.
  • Avoid editing functions.php directly on the live site; use a code snippets plugin with error protection or a child theme on staging.
  • Use maintained plugins and a supported PHP version.
  • Set up uptime monitoring so you know within minutes.

WordPress critical error: frequently asked questions

WordPress critical error: is the critical error a hack?

Usually not; it is mostly a plugin or theme conflict. But if core files show unexpected changes, scan for malware.

WordPress critical error: I did not receive the recovery email. Why?

The admin email may be out of date, or your server cannot send mail reliably. Use the debug log method instead, and set up SMTP for reliable email.

Related guides: 404 Error, 403 Forbidden Error and ERR_TOO_MANY_REDIRECTS.

For official guidance, see the official WordPress documentation.

Site down right now?

Our support team fixes critical errors and white screens quickly. Contact us.

Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.

Ask a Question on WhatsApp

Let's Build Your
Next Website

Tell us what you need and we will reply within 24 hours with honest advice and a fixed quote.

Trusted by our clients, rated 5.0 on Google

5.0 11 Google reviews Read all →
I had a great experience working with Waqas and his team. We got some website development and SEO work done, and I'm quite satisfied with the overall results. They understood our requirements, suggested improvements, and handled the work professionally. What I appreciated most was their communication, attention to detail, and willingness to make changes whenever needed. Waqas is very cooperative, and the team knows what they're doing. Definitely a good choice for anyone looking for reliable web development and digital marketing services.
HUHafiz Ubaid Google review · Nov 2026
I was referred to their company by someone, and I'm really glad I connected with them. Waqas, the CEO, is a very humble and professional person who leads his team exceptionally well. Their expertise in digital marketing, web development, and custom development services is impressive. The team is skilled, responsive, and committed to delivering quality work. Had a really positive experience working with them. Highly recommended!
MRMuhammad Rafeeq Google review · Nov 2026
I had hired them for my client's task of Custom Wordpress plugin development. and many other tasks later on.. Waqas is super fast and sharp.. I know him since 2019.. I really really appreciate his work. Highly recommended..
RFRaheela Farooqui Google review · Nov 2026
I had a positive experience working with Waqas and his team. They provided excellent support with graphic design and social media management. The team was professional, responsive, and attentive to our needs. They understood our vision and delivered quality work on time. Highly recommended for anyone looking for creative and reliable digital services.
URUsman Rock Google review · Nov 2026
I really appreciate their dedication and professionalism. They have a good understanding of SEO, social media marketing, and online brand growth. Communication is smooth, and the quality of work is impressive. Definitely a great team to work with!
SSSameer Sarafaraz Google review · Nov 2026
I've had a great experience working with their team. They understand digital marketing very well and know how to improve online visibility through effective SEO and marketing strategies. Professional, responsive, and reliable. Highly recommended! 🙌❤️
MNMohammad naveed Google review · Nov 2026
I had a really good experience with web Experts. Everything was easy to understand, well-organized, and user-friendly. I appreciate the effort and attention to detail that has gone into creating this platform. It was a smooth and pleasant experience, and I would definitely recommend it to others. Keep up the great work!
SSShazia shaikh Google review · Nov 2026
Extremely professional and committed I am Extremely happy to work with them I wish them best of luck Best Regards M. Salman Farooqui
SFSalman Farooqui Google review · Nov 2026
Outstanding experience! Quality, professionalism, and customer service are all excellent. Keep up the great work!
ARabdul rehman Google review · Nov 2026
Excellent service and a great experience. The team is professional, helpful, and dedicated. Highly recommended!
MEmustafa emb Google review · Nov 2026