WordPress 500 internal server error: what our lab broke and how we fixed it
In short
A WordPress 500 internal server error means the server or PHP stopped before a page was made. If every address fails, images included, suspect .htaccess: in our 17 Oct 2026 lab one typo there broke the whole site. If only pages fail and WordPress shows its critical error message, read the PHP error log for a memory or plugin fault.
Seeing this on your own site? Send us the address for a free site check, and a written report comes back within 2 business days.
Key points
- In our lab one dropped letter in .htaccess turned every address into a 500, including a plain image file and the login page.
- A php_value line in .htaccess did the same on Apache with php-fpm, a setup many hosts run, because that server does not know the command.
- When PHP ran out of memory, only the pages failed. Images and the login page still loaded, and WordPress showed its own critical error page.
- The Apache error log named the bad .htaccess line word for word. WordPress logged nothing, because it never ran.
On this page (10)
- What does a 500 internal server error mean in WordPress?
- How did we test it?
- What happens with one typo in .htaccess?
- Can a memory limit line in .htaccess cause a 500?
- What does a 500 from PHP memory look like?
- Why was there no debug.log?
- How do you fix a WordPress 500 internal server error?
- What did we not test?
- Is your site showing a 500 right now?
- Questions and answers
What does a 500 internal server error mean in WordPress?
A WordPress 500 internal server error means the server took the request and failed before it could answer. It says nothing about why. The cause sits in one of two places: the web server’s own settings, mostly the .htaccess file, or PHP while it builds the page.
The fastest way to tell them apart is to look at what still works.
Tracing a 500 on a staging copy, so the live site is not poked at while it is down, is part of our WordPress maintenance work.
How did we test it?
On 17 Oct 2026 we ran WordPress 7.1.3 behind Apache 2.4.67, with PHP 8.4.13 as php-fpm, the FastCGI setup many hosts use instead of PHP built into Apache. Permalinks were set to post name, and .htaccess held the standard WordPress block.
Before we broke anything, the home page, the Hello world post, the login page and a logo PNG from wp-includes all loaded with a 200. We checked each address with curl after every change.
What happens with one typo in .htaccess?
We changed RewriteRule to RewriteRul in the last rule of the WordPress block. One missing letter.
Every address returned a 500. The home page, the post, the login page, the dashboard and the PNG all got the same 571-byte Apache page: “Internal Server Error … More information about this error may be available in the server error log.”
The image is the tell. A plain picture file never touches WordPress, so when it fails too, the problem is in front of WordPress.
The Apache error log named the line exactly: “.htaccess: Invalid command ‘RewriteRul’, perhaps misspelled or defined by a module not included in the server configuration”. WordPress wrote nothing anywhere, because it never ran.
With the letter put back, every address returned 200 again.
Can a memory limit line in .htaccess cause a 500?
Yes. Many guides raise PHP memory with a php_value memory_limit line in .htaccess. We added php_value memory_limit 256M at the top of the file.
Every address went to a 500 again, with the same Apache page, and the log said “Invalid command ‘php_value'”. That command only exists when PHP is built into Apache. On a php-fpm server, Apache does not know it and refuses the whole file.
Removing the line brought the site back. On the same server, memory_limit = 256M in a .user.ini file in the site folder worked, and PHP read it back as 256M. The PHP manual on .user.ini files says only the CGI and FastCGI versions of PHP read them. An older test of ours went the other way: with PHP built into Apache, raising upload limits for “the link you followed has expired” worked through .htaccess and not .user.ini. Check which kind your host runs before you copy a line.
What does a 500 from PHP memory look like?
Different. We set the limit to 64 MB and added a test plugin that holds 80 MB while the front end is built.
The home page returned a 500 with WordPress’s own 2,704-byte page, “There has been a critical error on this website.” The login page and the PNG still loaded with a 200.
So when the login page or the images still work and visitors get the critical error line, the fault is in PHP, not .htaccess. The PHP log had the line: “Allowed memory size of 67108864 bytes exhausted (tried to allocate 83886112 bytes)”, with the plugin file and line number.
Raising the limit to 256 MB in .user.ini brought the home page back with the plugin still on. That gets the site up; the plugin is still the thing to fix. Our post on the WordPress memory exhausted error walks through WP_MEMORY_LIMIT and finding the plugin. The guide to the “There has been a critical error on this website” message covers the other PHP faults behind the same page.
One thing surprised us. When we set the limit lower, to 16 MB, the site stayed up. WordPress raised it to 40 MB on its own, the default for WP_MEMORY_LIMIT in the wp-config.php guide. A low host limit is not always the cause, even when it looks like it.
Why was there no debug.log?
The WordPress debugging guide says WP_DEBUG_LOG writes to wp-content/debug.log. In our lab no debug.log file appeared.
Our PHP pool set its own error log with php_admin_value, so the fatal line landed in the PHP log instead. Some hosts do the same. If debug.log stays empty, look for the PHP error log in the hosting panel before you decide nothing was logged.
How do you fix a WordPress 500 internal server error?
- Load a plain image from your site, such as /wp-includes/images/w-logo-blue.png. If it fails too, go to step 2. If it loads, go to step 4.
- Rename .htaccess to .htaccess-old by FTP or the host’s file manager and reload. If the site comes back, the file was the cause.
- Log in, open Settings > Permalinks and click Save Changes to write a clean WordPress block, as shown in the WordPress .htaccess guide. Copy back any other rules from the old file one at a time, testing after each, and leave out php_value lines if your host runs php-fpm.
- If only pages fail, open the PHP error log in your hosting panel and read the last fatal error. It names the file, so it names the plugin or theme.
- If the line says memory exhausted, raise the limit to get the site up, then deal with the plugin it names.
Our one-off 500 fix works the same way: a staging copy first, then the Apache and PHP logs, then the repair to .htaccess or the plugin. You get a site that loads and a note saying what broke it.
What did we not test?
- A real host’s control panel or its own branded error page.
- nginx, LiteSpeed or PHP built into Apache. On those the php_value line behaves differently.
- File permission or ownership errors, which can also give a 500.
- PHP timeouts on long requests. Busy PHP workers gave 503 and 504 errors in our WordPress 503 service unavailable lab.
- A real heavy plugin. Ours only held memory.
Is your site showing a 500 right now?
Tell us what fails and what changed last, and we will say whether it is .htaccess, PHP or something else.
Worried something else is off too? Send your site address for the free site check, and we reply in writing within 2 business days. If you already know what needs doing, see our one-off WordPress fixes.
Where did these facts come from?
- DistroCode lab, Apache 2.4.67, php-fpm 8.4.13, WordPress 7.1.3 (17 Oct 2026, 3:34 to 3:35 PM ET), .htaccess typo, php_value line, .user.ini memory limits, checked Oct 17, 2026
- WordPress Advanced Administration Handbook, Apache HTTPD and .htaccess (the BEGIN WordPress rewrite block), checked Oct 18, 2026
- WordPress Advanced Administration, wp-config.php, Increasing memory allocated to PHP (WP_MEMORY_LIMIT, 40M default for a single site), checked Oct 18, 2026
- WordPress Advanced Administration, Debugging in WordPress (WP_DEBUG_LOG writes to /wp-content/debug.log), checked Oct 17, 2026
- PHP manual, .user.ini files (read by the CGI and FastCGI SAPI, per directory), checked Oct 18, 2026
Questions and answers
What causes a 500 internal server error in WordPress?
Most often a broken .htaccess file, a PHP fatal error from a plugin or theme, or PHP running out of memory. In our lab the .htaccess fault gave Apache's plain error page on every address, and a memory fatal from a test plugin gave WordPress's critical error page on pages only.
Can I just delete .htaccess to fix a 500 error?
Rename it instead, so you can put it back. If the site loads after the rename, the file was the cause. Then save Settings > Permalinks to write a clean WordPress block, and add back only the extra rules you still need, one at a time.
Why is my debug.log empty when the site shows a 500?
Either WordPress never ran, as with a broken .htaccess, or the host sends PHP errors to its own log. In our lab no debug.log file appeared, because the PHP pool set its own error log, so the fatal line went to the PHP log.
Where do I set the PHP memory limit if php_value causes a 500?
On a host that runs PHP through FastCGI, use a .user.ini file in the site folder or the host's PHP settings screen. In our lab 256M in .user.ini took effect, while the same value as php_value in .htaccess took the site down.
Rather hand this to us? See the WordPress maintenance plan Want to know if the problem stops here? Ask for the free site check.
We write up one real fix or build a few times a week on LinkedIn. Follow DistroCode there: linkedin.com/company/distrocode


