Database Uploads for WordPress with PHP
...wanna import a big database file for WordPress using phpMyAdmin? Good luck. The default settings PHP settings in php.ini will likely prevent that.
Solution?
php.ini Settings for Large phpMyAdmin Database Imports
Large WordPress database imports through phpMyAdmin may fail when PHP upload limits, post limits, memory limits, or execution timers are too low.
Common PHP Settings
Recommended example for a large import:
upload_max_filesize = 512M
post_max_size = 600M
memory_limit = 768M
max_execution_time = 600
max_input_time = 600| | | | - | ------------------------------------------------------------------------------------------ | | | Maximum uploaded SQL file size. | | | | | | Maximum total HTTP POST body size. Should be larger than upload_max_filesize. |
|
| | | | PHP memory ceiling. Should usually be larger than post_max_size. |
|
| | | | Maximum PHP script run time, in seconds. | | | | | | Maximum time PHP may spend receiving input, including uploads. | | | |
phpMyAdmin-Specific SettingsIn $cfg['ExecTimeLimit'] = 600;
$cfg['MemoryLimit'] = '768M';
$cfg['UploadDir'] = 'upload';
Per-Site ConfigurationDepending on the PHP handler: # Apache module / mod_php only
php_value upload_max_filesize 512M
php_value post_max_size 600M
php_value memory_limit 768M
php_value max_execution_time 600
php_value max_input_time 600For CGI/FastCGI or PHP-FPM, use a per-directory upload_max_filesize = 512M
post_max_size = 600M
memory_limit = 768M
max_execution_time = 600
max_input_time = 600Notes
External References |