How to fix the 500 internal server error in wordpress


“500 Internal server Error” or plain “Internal vps Error” is popular when installing và using any website platform. Not only PrestaShop but you might also encounter this error on WordPress, Shopify, Magento websites & so on. This disreputable HTTP Error 500 could turn an online store owner’s smile to lớn a bewildered frown with one click. The fear of lost sales, it stonewalls your customers’ ability to browse your store và purchase products. For web developers, this error is a nightmare. Everyone has to lớn scurry to lớn get his or her stores back online.

Bạn đang xem: How to fix the 500 internal server error in wordpress

As terrible as it sounds, it"s not too scary. On this post, I’ll explain the error and offer some troubleshooting ideas for your PrestaShop store. The next time you encounter this error, instead of hiding under your blanket, you’ll be prepared to lớn act fast, handle the issue and keep on making deals. Even if you’re not using PrestaShop, these solutions can still worth to lớn take a try.

How to perceive the HTTP Error 500

It"s necessary khổng lồ not confound the HTTP Error 500 with the Error 404 Page Not Found. To deal with the error, firstly, we have lớn go over the various ways you may see this error message on your PC. There are different appearances of this message due lớn each host/server is permitted to adjust the way it"s shown. Here are some regular ways you may see this error.

"500 Internal vps Error""Internal vps Error""500 Error""HTTP 500 - Internal vps Error""HTTP 500 Internal Error""HTTP Error 500"

Most occasions you will see this message accompanied by different types of this classic familiar line "The vps encountered an internal error or misconfiguration & was unable khổng lồ complete your request". và this error can appear on any web browser and any operating system. Here is a screen capture of one of the forms Error 500 may be displayed on your browser.


So, what is the HTTP Error 500?

Simply put, the Error 500 is the way your web vps saying "Something turned out badly but I have no clue what it is!" Well, it’s really unhelpful at all. But, the HTTP error logs can (and usually will) show you what has gone wrong.

How can I troubleshoot HTTP Error 500?

Each web hệ thống will have an error log. For Apache servers, it is usually located at /var/log/apache/error.log. It will show you something like this:

PHP Fatal error: Out of memory (allocated 2097152) (tried lớn allocate 59462712 bytes) in /home/myuser/public_html/classes/Configuration.php on line 206

Again, not very helpful unless you recognize what these numbers mean. But don’t be worry, we still have another option.

Troubleshooting Error 500 for PrestaShop website

If your PrestaShop store is suffering from this error, you can get some detailed information by turning on PrestaShop’s Error Reporting in the file “config/”. There are 2 ways to lớn turn on Error Reporting depending on what PrestaShop version you have. For PrestaShop v1.4 through v1.5.2

Open config/ or around line 29 you will find this line
ini_set("display_errors", "on");

For PrestaShop v1.5.3 and higher versions

Open config/ or around line 28 you will find this line define("_PS_MODE_DEV_", false);Change that line khổng lồ read define("_PS_MODE_DEV_", true);

Then back lớn the page that gave you the error once more, & you’ll see something lượt thích this:

Db->executeS() must be used only with select, show, explain or describe queries at line 471 in tệp tin classes/db/Db.php 465. 466. // This method must be used only with queries which display results 467. If (!preg_match("#^s*(?s*(select|show|explain|describe|desc)s#i", $sql))

OK, more info but still scary for us.

Xem thêm: Top 20 Công Cụ Trực Tuyến Kiểm Tra Tốc Độ Load Website Của Bạn Tốt Nhất Hiện Nay

Just show me how khổng lồ fix this error

For most PrestaShop store owners, you"ll want to lớn know the most common ways this problem is caused so that you can try out some solutions yourself. Here we have the best 5 reasons why Error 500 occurs, & what you can vì to address them.

1. File and folder permission is wrong

Some servers that have SuPHP or Fast-CGI turned on can be especially sensitive to tệp tin and folder permissions.The right permission for files is 644 and folders is 755.If you see from the hệ thống logs or PrestaShop error report that tệp tin permissions may be the problem, try resetting the permissions with these commands:

find /home/USERNAME/public_html -type d -exec chmod 755 ; find /home/USERNAME/public_html -type f -exec chmod 644 ;

Replace /home/USERNAME/public_html with the path to lớn your web directory.

Note: Take a backup of your site before you execute any command

2. Incorrectly configured .htaccess file

Most of the times, you will receive an internal hệ thống error when the htaccess file is configured incorrectly. The main culprits of the htaccess errors are "URL Rewrite" settings or Friendly URL enabling. The htaccess syntax is very strict, if you add an incorrect command, or even an incorrect character, your server will return error 500. Make a backup of your htaccess and regenerate the htaccess tệp tin either through the back office or by toggling the Enable Friendly URLoption.

3. Hệ thống timeout

Every server has their own timeout setting, which sets the time that any given script can run. If the function or script crosses that limit, Error 500 will occur. The most common scripts in PrestaShop that may take too long to lớn load are CSV Imports, backups, translation loading, import/exports and thumbnail regeneration. Many vps limits are set khổng lồ 30 seconds, which is not long enough to run these scripts. You should tương tác your hosting provider & inquire about changing the limit, at least temporarily.

4. Low PHP memory limit

Many website hosts phối the default memory allocation for PHP as 32 MB, 64 MB or 128 MB. However, PrestaShop requires at least 128 MB to lớn function và put in some more for modules if you need them. So, a suitable memory allocation is 256 MB. If you have a VPS, mix it to 512 MB.

5. Missing PHP modules

A common issue seen with PrestaShop sites in VPSs is that they lack all the needed PHP modules. To help PrestaShop function, we will need:


To check if these modules are enabled for your website, copy the code below into "phpinfo.php" file and upload it to your site. Then mở cửa it in a browser, and kiểm tra for these extensions.

phpinfo(); ?>

If any of those modules are missing, open your server’s php.ini tệp tin to see if it is enabled. If not, you’ll need lớn install them manually.

Note: Remember to lớn delete the phpinfo.php file once you are done. Hackers could use that to lớn target specific vulnerabilities.

Chuyên mục: Domain Hosting