How to solve “maximum execution time of 30 seconds exceeded” error


Are you seeing ‘Fatal error: Maximum execution time of 30 seconds exceeded’ on your screen when trying to update a WordPress plugin or theme?

Typically this problem occurs when a PHPhường code in WordPress takes a long time lớn run và reaches the maximum time limit set by your WordPress hosting hệ thống. The time limit is important because it helps prsự kiện the abuse of server resources.

In this article, we will show you how to fix the fatal error: maximum execution time exceeded in WordPress.


Why Maximum Execution Time Exceeded Error Occurs?

WordPress is coded mainly in the PHPhường programming language. To protect web servers from abuse, there is a time limit mix for how long a PHPhường script can run.

The actual time limit varies across hosting companies, however most of the times the maximum execution time is phối between 30 – 60 seconds because that’s usually enough for a good PHPhường script lớn run.

When a script reaches the maximum execution time limit, it results in maximum execution time exceeded error.


Fixing Maximum Execution Time Exceeded Error

Although Maximum Execution Time Exceeded error is named a ‘fatal error,’ it is one of the most comtháng WordPress errors, and you can easily resolve sầu this.

Depending on when và where the error is triggered, WordPress may show the following error message to lớn your website visitors.


This is part of the fatal error protection feature added in WordPress 5.2. You may also receive sầu an email that will tell you which plugin (if a plugin triggered the error) caused the issue.


The tin nhắn will also include a special links, which will allow you to lớn log in to WordPress with ‘Recovery mode’.


Once there, you can simply deactivate or delete the plugin causing the error.

However, if you don’t want to lớn deactivate a plugin, then you can fix the underlying cause that triggered the error.

To fix the error, you will need lớn manually edit your .htaccess file & add a simple line of code.

Simply connect to your trang web using an FTPhường. client.

Bạn đang xem: How to solve “maximum execution time of 30 seconds exceeded” error

Your .htaccess file is located in the same folder as your /wp-content/ và /wp-admin/ folders. If you can’t find it, then look at our article on why you can’t find the .htaccess tệp tin và how khổng lồ find it.

For example, if you are using FileZilla as your FTP client, then you can find it in the ‘Remote Site’ section on the right-hvà column.


Once you locate the .htaccess tệp tin, right-clichồng và open ‘View/Edit’ option. This will open the file with in a text editor.


Next, you need lớn add this line at the bottom of your .htaccess file:

php_value max_execution_time 300If you are using Notepad as your text editor, here is how it may look.


Once done, save your file.

This code simply sets the value for maximum execution time to 300 seconds (5 minutes). You can now visit your website khổng lồ see if the error is resolved.

If you still get the error, then try increasing the value lớn 600.

Xem thêm: Txt Là File Đuôi Txt Là Gì ? Làm Thế Nào Để Mở Tập Tin Đuôi Txt Là Gì

If you found this method easier, then check out these most useful .htaccess tricks for WordPress.

Another method to lớn fix the maximum execution time exceeded error in WordPress is by modifying your php.ini tệp tin.

The php.ini file is a configuration tệp tin that defines settings for PHP on your VPS. On many WordPress hosting platforms, you may not see it inside your WordPress folder.

In that case, you can create a new php.ini tệp tin inside your WordPress root thư mục. After that, edit the php.ini tệp tin and add the following line.

max_execution_time = 60Don’t forget to save sầu and upload your changes bachồng to lớn the VPS. You can now visit your trang web and to lớn see if the error has gone.

In most cases, increasing maximum execution time using either of these two methods will resolve sầu the error. However if it doesn’t, then you need lớn tương tác your WordPress hosting provider for assistance.

We hope this article helped you fix the fatal error: maximum execution time exceeded in WordPress. You may also want to see our guide on how to lớn fix the error establishing a database connection in WordPress.

If you liked this article, then please subscribe khổng lồ our YouTube Channel for WordPress đoạn phim tutorials. You can also find us on Twitter and Facebook.

tinh dầu vape, pod 1 lần