Do you see the dreaded 500 error?
Well, this one is the most complex and opaque error, like the 503 error, except the error establishing a database connection in WordPress.
It could be intimidating, even if you are not a beginner.
Because –
1. You can’t see anything besides a white screen of death or a 500 error written.
2. If the error doesn’t get fixed sooner, it may pose a loss in SEO as well as data loss.
Table of Contents
500 Internal Server Error Reasons
Due to its ambiguity, there are numerous potential causes for the havoc error.
- Corrupted database
- Corrupted WordPress Core
- Malware-infected WordPress Core
- SQL Injection Attack on Database
- PHP Memory Limit
- Corrupted .htaccess file
- Vulnerable Plugins & Theme
- Wrong file and folder permissions
- If you’re experiencing one of them, you can find closure to the solution.
What does the 500 Internal Server Error mean?
According to the Internet Engineering Task Force,
“The 500 status code indicates that the server encountered an unexpected condition that
Prevented it from fulfilling the request.”
When a user visits a website, a browser sends a request to the website’s server. Now the server receives the request, makes a response (like a particular post), and sends it back to the browser with an HTTP header.
It displays on the screen. While the server successfully processes the request, the HTTP header sends a 200 status code, which means everything is ok. But it sends a 500 status code which means something went wrong.
Many errors indulge HTTP status codes that look like 500 errors, but they have differences.
500 Internal Server Error Variations
Every web server and browser has its own way of defining the error, which apparently changes on different web servers and browsers. So you can see many defining versions of the error:
500 Internal Server Error: Most popular
Internal Server Error
500- Internal Server Error
Is currently unable to handle this request. HTTP ERROR 500
500 Internal Server Error. Sorry something went wrong.
HTTP 500 – Internal Server Error
The website cannot display the page – HTTP 500
500 That’s an error. There was an error. Please try again later. That’s all we know.
Sometimes, you may confront a long message:
Now let’s start fixing…
From the first view, the error indicates a server issue. But both client-side and server-side matters can cause the error. So we will look at both sides.
1. Reload the page
Before starting any operation, press F5 to reload the page. Sometimes servers get overloaded and can’t respond in time. So it would help if you had to wait for a few minutes, reload it, and even try different browsers to test it out.
You can check it from a different system; open down.com, enter your website URL, and check now.
If it is showing that the website is running, the problem exists on your side.
It indicated that the server was at its peak load or that some plugins and themes were updated recently.
So after a few minutes, the page will be open, and don’t forget to clear your cache before accessing the page.
But if down.com says the website is down for everyone, then the server is in big trouble.
2. Check Your Server Logs or Start Debugging
For enabling server error log and debugging, you need to paste the code in the config.php file just before /*That’s all, stop editing! Happy publishing.*/
// Enable WP_DEBUG mode
define( ‘WP_DEBUG’, true );
// Enable Debug logging to the /wp-content/debug.log file
define( ‘WP_DEBUG_LOG’, true );
// Disable display of errors and warnings
define( ‘WP_DEBUG_DISPLAY’, false );
@ini_set( ‘display_errors’, 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( ‘SCRIPT_DEBUG’, true );
Now open the debug.log file located in the wp-content folder.
If you see a fatal PHP error, you must enable PHP reporting to turn it out.
Add the following code to the php file, which is showing an error.
ini_set(‘display_errors’, 1);
ini_set(‘display_startup_errors’, 1);
error_reporting(E_ALL);
And also, add the following code to your php.ini file:
display_error =on
Now, fatal PHP errors would be shown in the understandable text. You can take action, but if you’re a beginner, then hiring a WordPress developer on Fiverr at affordable pricing would be time-saving rather than putting your hands in nasty code. It may lead to more complexity, data loss, etc.
3. Reinstall WordPress Core
Sometimes WordPress Core gets corrupted owing to older versions. In this situation, you need to reinstall WordPress without affecting any content, plugins, or themes.
How to Reinstall WordPress Core
1. Download the latest version of WordPress from WordPress.org
2. Extract it, delete the wp-content folder, and zip it again.
3. Now connect the server through FTP
4. upload it at public_html
5. Extract the zip, choose to overwrite in action, and press ok.
6. Now, every file and folder will be changed except wp-content, config.php, the.htaccess file, and any other files that don’t come with the WordPress zip file.
If the site doesn’t run properly, then the WordPress file might be infected with malware. There is a simple indication of malware if you see any suspicious files or codes in some files.
Then you should hire a WordPress expert who can handle it better because it is a time-consuming and head-scratching task.
4. Permission Error
Wrong permission with a file or folder can pose an error. So you have to set up standard permissions, which are usually set up while installing WordPress
Standard Permissions
-All directories should be 755 (drwxr-xr-x) or 750.
-All files should be 644 (-rw-r-r-) or 640.
-WP-config.php could be 440 or 400 to prevent others’ access while hardening.
-Never set up 777 for any directories, even for upload directories.
Now you can correct permissions through FTP or the File Manager of cPanel.
-Go to the root folder
-Select any file or folder, click right, choose permission, and set standard permission.
5. Problem with Your .htaccess File
.htaccess file is a file of rules that let browsers know how to act with a website. So minor errors can interrupt data transfer to the browser and invoke the error.
-Now you have to create a new .htaccess file.
-Login into WordPress admin, navigate to settings> permalinks
-On the other side, Go to the root path in the file manager and rename the existing .htaccess file (.htaccess_old)
-In the permalinks section, click Save Changes.
-It will create a new .htaccess file.
If you can’t access WP-admin, paste the following code, name it .htaccess and upload it back to the root path.
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
6. Clean Your Database
A database stores most WordPress settings like plugins, themes, wp-admin, posts, image metadata, etc.
So whenever you update, edit, or publish any post, it leaves footprints that occupy space. Plugins and themes also do the same.
After a while, this garbage can choke the RAM. It not only slows down the web pages but also calls the error.
Cleaning through the WP-Optimize plugin would solve it, although you can also clean abandoned tables left by uninstalled plugins.
But you can’t access the login area or have to clean millions of rows of activated plugins; see the guide.
7.SQL Injection Attack on Database
If you see the “add plugin page,” it doesn’t show plugins from the WordPress directory, and the theme page doesn’t. Then there is a high possibility that your SQL server is suffering from an SQL injection attack.
In a severe situation, contact the support team or hire a WordPress security expert asap.
8. Check Your Plugins and Themes
Plugins and themes can also be culprits because of vulnerable & unstable code updates or no longer updated. So check your plugins and theme.
9.PHP Memory Limit
The new WordPress installation starts with 32 MB as the memory limit at Godaddy. Ideally, it requires 128 MB for a personal blog. So after installing a few plugins, Wordpress starts notifying that the PHP memory limit is exhausted. You need to increase it to 128 MB.
But when you design your blog with page builder plugins, the situation worsens. Again, has to increase it to 256MB, which impacts other operations because Godaddy shared hosting plans have less RAM.
Their entry-level plan consists of 512 MB RAM only. So increase your resources, or best of all, move to cloud hosting.
Anyway, by debugging, you can figure out the problem, and with the guide, you can fix it.
10. Disable High CPU Plugins
Being a beginner, we love to see, try, and experiment with new plugins; we don’t even care about the size of the plugin or how it may impact the whole site.
But it impacts a lot. Consume RAM along with the CPU.
–Install WP Hive extension to chrome browser
-Visit WordPress.org/plugins
-Search your plugins
-Finding a red cross on memory usage, consider replacing it with a lightweight one.
My Favorite list of Lightweight Plugins
WP Rocket
Rankmath
Perfmatters
Flying Image
Gutenberg
Spam Comment
11. Disable Plugins’ Unused Feature
Many plugins come with many features. We use some parts, but not all. Rest features still run in the background and consume resources. Disable the feature; you don’t use it.
But disabling unused features of every plugin is not easy. Some of these don’t give the option to deactivate the feature.
Then use the Perfmatters plugin to switch it off.
-Install the plugin and navigate to Assets>Enable Script Manager
-Now browse any page and click on Script Manager over the top
-Disable the unused feature and click save.
You can even disable some features that are for specific pages, like the contact us page.
-Visit the contact us page.
-Click on script manager.
-Select location: everywhere, and under exceptions, location:current url.
It would disable the contact us plugin resources for all pages except the contact us page.
12. Limit Login Attempts
Constant login attempts hamper performance. I recommend you change your login URL to hide it from the rest of the world, and it will secure you from intended hackers.
The Permatters plugin does it. You can set a custom login URL at the bottom of the general section.
Although you can try the Limit login plugin, it will save your resources, but not from online threats.
13. Use Latest PHP
It’s pretty rational to have the latest PHP, and it just drives more performance, security, and reliability than its predecessor.
-Head to GoDaddy Product Page
-Select manage all under managed WordPress
-Choose settings from the right three dots.
-Click on change
-Select the latest one and save changes.
*Before changing the PHP version, you must take a backup, and it will save you from unwanted errors.
14. Keep Web Property and Email Hosting Separate
Email hosting also consumes resources. For sending and receiving email, one needs to set up and run an SMTP server. So running two servers on a tiny shared hosting plan invites massive complexity, unbridled load, and double vulnerabilities that alleviate performance and raise safety and security issues.
That’s why many popular modern web hosting services, like Cloudways & Kinsta, offer only web application-dedicated hosting that doesn’t include email hosting.
They deliver it as an add-on. You can buy it for a penny. Email hosting will be on the main server.
Bingo, no impact on the main server.
15. Don’t use WooCommerce on Shared Hosting
WooCommerce is highly resource-intensive and requires at least 256MB as a memory limit. While the Godaddy hosting plan starts at 512 MB only.
At the bottleneck resource level, it is irrational to run WooCommerce, and it will choke the server.
16. Speedup Page Builders
I have never preferred page builders because thousands of code lines involve many unused heavy JS and unused CSS. It is always overloaded on websites while users access it.
Hence, it impacts servers and slows down the websites, which can lead to losing rankings.
Of course, for not accomplishing core web vitals!
So hard-coding is the best way to curb every line of coding. By the way, you would still like to use page builders like Elementor and Divi.
That’s good news that comes with speed optimization settings. You can remove unused resources and speed up JS.
17. Use A Premium Cache Plugin
The main work of a cache plugin is to make copies of HTTP responses that can be delivered quickly next time. It literally unloads 50%–60% of the pressure on the server.
Now the expectations for a cache plugin have arisen beyond caching. It should remove unused CSS, optimize JS, lazyload Images, speed up videos, control heartbeats, defer third-party codes, etc.
These performance features come with premium plugins, like WP Rocket. It will do page caching, cache preloading, e-commerce optimization, Gzip compression, browser caching, database optimization, image optimization, etc.
Overall, it will improve server availability, website loading, and faster TTFB.
You need a businessman mindset. Investing in premium items gets a superior ROI.
18. Control Heartbeat
Heartbeat comes in use while you publish or edit any posts & pages, get notifications of plugins and sales reports for WooCommerce plugins.
In WordPress, any action needs resources; just like that, it also consumes RAM.
On shared hosting, it makes the situation more tedious. So you should control it with the WP Rocket or Perfmatters plugin.
19. Use Cloudflare
It couldn’t be an exaggeration if I call it the godfather of websites. Every month I save around 80–98% bandwidth, mitigate thousands of thousand online threats, and enjoy lightning-fast TTFB.
You can also do the same; just set up two-page rules.
While you edit or publish a new post, disable the page rules.
20. Choose Robust Cloud Hosting instead of shared hosting.
Godaddy is infamously stagnant in keeping its software and hardware updated and does oversell, manage overcrowded servers, and provide poor customer support.
That’s why Forbes suggests leaving Godaddy, and iThemes called them the poor and overcrowded host and gold miner of upselling strategies.
These come in the form of web server failures, database server crashes, various internal server errors, slow performance, millions of customer data breaches, etc.,
So leave it for stunning cloud hosting, which is fantastic and popular among professional web admins.
For a modern hosting model, I would recommend you Cloudways.
Why?
I have been using it since 2019 and am very happy with its astonishing performance.
PSI score on mobile is perfect, LCP is just under 800MS, and the server responds under 100 MS in most locations.
With the premium performance, I could compete in SERP against my worldwide competitors and get ranked. That’s why you’re reading the post.
Forbes featured Cloudways is a beginner’s managed cloud host where you can host at the top 3 cloud infrastructures, Google, AWS, and Digital Ocean, with NVmeSSD-powered 60+ global data centers.
Within clicks, no technicalities are required.
You can manage your website and server easily with their intuitive dashboard. Apart from it,
You’ll enjoy an Intel Xeon Scalable processor with 3.90GHz, Object Cache Pro, pre-configured PHP-FPM, Cloudways CDN, auto-healing server, auto backups, free migration, a “pay as you go” modest payment model, an intelligent assistant bot, and flexible customer support.
These will enhance Wordpress 4x speedier and help to solve any query asap.
You can test it with its 3-day trial offer without a credit card before deciding to go with it.
FAQ
How do I fix error code 500?
Fix your corrupted database server, WordPress core files, .htaccess file, and replace the infected theme and plugin.
What is the cause of the white screen of death 500 error?
Corrupted database server, wrong file and folder permissions, php memory limit, SQL injection attack
What does error status 500 mean?
When a server cannot fulfill your request, they return a 500-HTTP status code. There could be various reasons behind it.
Meet Ravi Kumar, our web hosting and WordPress speed optimization guru with over 4 years of experience. He’s optimized 150+ websites, uncovering common VPS performance issues. Armed with insights, Ravi ensures smooth VPS experiences for all.