HTTP 500 Internal Server Error in PHP: How to Fix It
Your website shows a server error (HTTP 500An HTTP status code is a three-digit number a website sends back with every page request to say how it went, such as 200 for OK or 500 for an error.) instead of your pages, so visitors cannot reach your content.
Which PHP version does your site report?
We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.
More about this
If it lasts, that costs you enquiries and trust.
The message is vague on purpose, but the real reason is almost always written in a log your hostingWeb hosting is the service that keeps your website's files on a computer that is always online, so visitors can open your site at any time. keeps, and the steps below show how to find it.
An HTTP 500 internal server error PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it. site problem means the server hit an error while running your page and could not say more to the visitor. The message is deliberately vague. The real cause is almost always written to the server's error logAn error log is a file where your website's software writes down what went wrong, with the time and place. It is the first thing to check when a site breaks., and it is usually a PHP fatal error, a faulty configuration file, or a broken pluginA WordPress plugin is an add-on you install in WordPress to give your site extra features, such as contact forms, SEO tools or a webshop. or themeA WordPress theme is a ready-made package that decides how your WordPress site looks and how its pages are laid out. Change the theme and the design changes..
What the message means
HTTP 500 is a general status code. It says the server failed, not what failed. Your browser only shows the generic page.
The detail stays on the server, which is why checking the log is the first real step and guessing is the slow route.
Common causes
On PHP sites the usual suspects are a fatal PHP error in a plugin, theme or custom script, a syntax mistake in the .htaccess file, a PHP memory limitmemory_limit is a PHP setting that decides how much memory the code behind one page may use. If it needs more, it stops with an error. that is too low, wrong file or folder permissions, and a PHP versionA PHP version is a numbered edition of PHP, like 8.3. Each edition is looked after for a limited time, then gets security fixes only, then nothing. that does not match the code. A recent update, edit or server change is often the trigger, so ask yourself what changed just before the error appeared.
How to check it safely
Start by taking a backupA backup is a separate copy of your website's files and database, so you can bring the site back after a mistake, a hack or a failed update. of your files and database if you still can. Then open the error log in your hosting control panelA hosting control panel, such as cPanel, Plesk or DirectAdmin, is the web page where you manage your domain, email, databases and PHP version., or ask your hosting provider for the most recent lines. Look for the first error with a file name and line number.
Do not turn on public error display on a live site, because it can reveal file paths and other details to visitors. Never share passwords or keys when you ask for help.
Also confirm which PHP version the site runs now. If it changed recently, that alone can explain the error.
What you can try yourself
Try these in order. First, read the error log and follow the file it names. Second, if you edited .htaccess recently, rename it temporarily and reload the page.
If the site works, the old file had a bad rule, and you can restore a clean version. Third, on WordPressWordPress is free software for building and editing a website in your browser. It is written in PHP, so it builds each page when someone visits., rename the plugins folder through your file manager so all plugins are switched off, then reload. If the error goes away, switch plugins back on one at a time to find the culprit.
Fourth, switch to a default theme the same way. Fifth, if the log mentions memory, raise the PHP memory limit in your hosting settings. Write down every change so you can undo it.
When the PHP version is the cause
If the error began right after a PHP upgrade or a host migration, the code may use features the new version no longer supports, or the new server may lack an extension. Switching the PHP version back in your control panel can restore the site while you plan a proper fix. Only switch back to a PHP version that still receives security fixes, keep it as short as possible, and check with your host that it includes the latest security release.
Our page on supported PHP versions explains which versions the PHP project still supports.
When to get help
If the log is unclear, the site stays down, or a business-critical store is affected, get help before you change more files. A human at Website Without PHP replies within 1 business day. An emergency fix starts from $425, excluding VAT.