Solve Maximum Execution Time Of 60 Seconds Exceeded

So, you have developed your WordPress site via the localhost and then, now you want to move it to your site live via the domain name. So, the question may arise in your head that, is it really possible and can be done easily? And the answer for this question would be yes, it is easy and can be done easily. First of all, you can export the data of your localhost via the WordPress Export feature and then import it via the WordPress Importer plugin, which is available via the WordPress plugin directory. This plugin will help you in importing the WordPress post and pages data in the new site, from the existing site. But, due to some reason, you could not import it properly, and then displays the error like Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\demo-import\wp-includes\wp-db.php on line 1811 again and again while you try to import it. Here, we can see the same issue while we were importing the demo data of WordPress in our local development environment:

maximum-execution-time-exceeded

After this error is displayed in your site, while you import the exported data in your WordPress site, then, this screen comes up while you see the front-end of your site:

import-failed

So, now you have no clue on about this issue about how to solve it, right? So, here we will describe about how to solve this issue in your site.

WordPress has restricted the maximum execution time of the import to 60 seconds. No, matter which way you try to solve this issue in your site, like via the .htaccess file change, or, while in your local development environment, change in the php.ini file. It will not solve your issue at all. We had already checked out on those many times and no success on every time. So, we got fed up and then searched on many site and finally could find the solution on this issue. Hence, we thought out that you might have been facing the same issue in your site too while importing the WordPress export file in your site. So, here we will provide the solution on it.

In order to solve this issue in your site, since it is being controlled via the WordPress file, so, you need to edit the WordPress file while you import and then edit it back as it was before. The file which need to be changed while doing the importing work in your site is in wp-includes/deprecated.php file. Here, in this file, you can find the code as:

Here, this code need to be either commented out, or deleted. You can find the tutorial on commenting out that code from this link. And after doing that, you can import the exported xml data of WordPress via the WordPress Importer plugin easily in your site. And you will also not see this error Maximum Execution Time Of 60 Seconds Exceeded at all, since this error is only shown if the import fails.  This error especially occurs, if you have a lot of images and downloadable files in your site, with big sizes of each of those files. So, after doing that change, here, below is the import screen from our development site:

import-success

Now, here below is the screenshot of our local development site while we have successfully imported the WordPress exported data xml file in our site:

import-success-front-end

Now, since you know how to solve this error in your site, now, we hope that you will import each of your exported xml WordPress file uccessfully in your site again and again without seeing the error as Maximum Execution Time Of 60 Seconds Exceeded.

, , , , , ,

Post navigation

Bishal Napit

Bishal Napit is a WordPress theme developer from Tansen, Palpa, with a passion to learn more on WordPress.

Leave a Reply