Wordpress import blogger limited to 2MB

I am testing Wordpress 4.6 and trying to import xml archive from blogger.

I am bit of stuck because the default upload size is 2 MB:
I am using Raspberry Pi Raspbian Jessie operating system. This is basically Debian.
By the way to install Wordpress on Raspberry Pi is very easy.

The options I am interested to change is these:
grep "^upload_max_filesize" /etc/php5/apache2/php.ini
grep "^file_uploads" /etc/php5/apache2/php.ini
grep "^memory_limit" /etc/php5/apache2/php.ini
grep "^post_max_size" /etc/php5/apache2/php.ini
grep "^max_execution_time" /etc/php5/apache2/php.ini
So I set max file size to 64MB and time limit to 5 minutes:
sed -i "s/^upload_max_filesize = .*$/upload_max_filesize = 64M/" /etc/php5/apache2/php.ini
sed -i "s/^file_uploads = .*$/file_uploads = On/" /etc/php5/apache2/php.ini
sed -i "s/^memory_limit = .*$/memory_limit = 64M/" /etc/php5/apache2/php.ini
sed -i "s/^post_max_size = .*$/post_max_size = 64M/" /etc/php5/apache2/php.ini
sed -i "s/^max_execution_time = .*$/max_execution_time = 300/" /etc/php5/apache2/php.ini
Now I need to restart the apache daemon:
service apache2 restart
Appendix
I can specify custom upload temp directory with upload_tmp_dir option.

To set up custom temp directory I need to look for line:
grep "upload_tmp_dir" /etc/php5/apache2/php.ini
To set /tmp as upload temp dir:
sed -i "s/^.*upload_tmp_dir =.*$/upload_tmp_dir = \/tmp/" /etc/php5/apache2/php.ini
To set back defaults:
sed -i "s/^.*upload_tmp_dir =.*$/;upload_tmp_dir =/" /etc/php5/apache2/php.ini
Appendix:
I the web server is server by nginx, php5-fpm:
#grep values for php5-fpm/nginx
grep "^upload_max_filesize" /etc/php5/fpm/php.ini
grep "^file_uploads" /etc/php5/fpm/php.ini
grep "^memory_limit" /etc/php5/fpm/php.ini
grep "^post_max_size" /etc/php5/fpm/php.ini
grep "^max_execution_time" /etc/php5/fpm/php.ini

#increase php5-fpm/nginx settings
sed -i "s/^upload_max_filesize = .*$/upload_max_filesize = 256M/" /etc/php5/fpm/php.ini
sed -i "s/^file_uploads = .*$/file_uploads = On/" /etc/php5/fpm/php.ini
sed -i "s/^memory_limit = .*$/memory_limit = 256M/" /etc/php5/fpm/php.ini
sed -i "s/^post_max_size = .*$/post_max_size = 256M/" /etc/php5/fpm/php.ini
sed -i "s/^max_execution_time = .*$/max_execution_time = 300/" /etc/php5/fpm/php.ini

#reload nginx
/etc/init.d/php5-fpm reload
/etc/init.d/nginx reload

1 comment:

  1. solve, automate, speed up WordPress Is Very Helpful. Thanks for such Information
    Looking for WordPress Support Visit :
    WordPress Support
    WordPress Technical Support
    WordPress Support Phone Number

    ReplyDelete