If you find yourself with this problem, the fix is easy:
- First, comment out the following line in wp-admin/import/wordpress.php . In WordPress 2.8.4, it's line 367.
set_time_limit( 60 );
- Configure your web server to allow PHP scripts to execute for a long time. In Apache, you do that with the "Timeout" directive:
Timeout 6000
This can be put within a specific virtual host, or configured globally. - Increase PHP's max execution time. This is done with the "max_execution_time" setting in the appropriate php.ini :
max_execution_time = 600 ; Maximum execution time of each script, in seconds
or within your web server's configuration, if that's allowed. For example, within Apache, you include this globally, or within a virtual host:<IfModule mod_php5.c>
php_value max_execution_time 6000
</IfModule>
1 comments:
arrggghh i have the same problem but can't find any fix. The file i'm trying to import is about 11MB, wordpress chokes when i try to import it, i found a program to split the file into small files which works, but when importing each small file it seems like wordpress just times out before it finishes, sometimes it will import 50 items, sometimes 40, sometimes 10 it seems to depend on the filesize of the attachments i guess. i'm on godaddy shared linux, i've tried the php.ini change and .htaccess and the import/wordpress.php change, and still no solution. Got any idea? thank you!!
Post a Comment