0

In deployed WordPress Certified by Bitnami and Automattic, which works for my other site. this site I exported and have a 137 MB file to import. It complains the file is too big.

Alright, I follow these instructions [1] trying #1 the .htaccess file and #2 the wp-config.php file. I even just put in the upload-max-filesize 256M, and not the others, into each of these two files and it still does not work. In fact my website no longer is reachable. I back off the changes and restart the instance...luckily, my website is recovered.

How can I import a WP Migration export file into my site? How can I allow it to accept such large files? And not crash my site again.

[1] https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/

rabbit
  • 111
  • 9
  • 1
    You need to change `upload_max_filesize` and `post_max_size` in `php.ini`. Your system might have more than one PHP installation. You need to change the one for your web server (Apache). The exact file location depends on how your system is setup. If you create a dummy PHP page with `phpinfo()`, you will see the exact location for your system. – John Hanley May 06 '20 at 21:35
  • I am new to php. How would I write such a script. I tried: robert_withers@callistohouse-1-vm:/opt/bitnami/apps/wordpress/htdocs$ cat my.php – rabbit May 06 '20 at 21:59
  • There are lots of examples on the Internet about `phpinfo()`. You don't run the page with the PHP command; you load the page in your browser. – John Hanley May 06 '20 at 22:03
  • Yes, thank you. I get this for configuration file: Loaded Configuration File /opt/bitnami/php/etc/php.ini I changed that file with this: ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 256M After resetting I still get the same result on import file too big. What should I do next? – rabbit May 06 '20 at 22:13
  • I made the change to .htaccess and wp-config.php, restting...nope, the site comes up but I cannot import. – rabbit May 06 '20 at 22:19
  • Changing those variables inside of the appropriate php.ini file should work. In WordPress, if you go to /wp-admin/media-new.php what does it say the "Maximum upload file size" is? Does All-in-One WP Migration have an option to use a file already uploaded to the server via FTP? If not, one thing you could do is to upload the SQL file via FTP, and then use SSH to import the database with the following command: https://stackoverflow.com/questions/17666249/how-do-i-import-an-sql-file-using-the-command-line-in-mysql – hostingutilities.com May 06 '20 at 23:39
  • [go to /wp-admin/media-new.php what does it say the "Maximum upload file size"] I could not find such setting. The link you posted was for a .sql file. I have a .wpress file. – rabbit May 07 '20 at 00:34
  • When I go to the All-in-One WP Migration -> Import page, from wp-admin/ it claims: [Maximum upload file size: 40 MB.] – rabbit May 07 '20 at 00:41
  • Did you restart Apache after changing php.ini? – John Hanley May 07 '20 at 01:30
  • Yes, I reset the VM instance. – rabbit May 07 '20 at 05:38
  • You can get to the /wp-admin/media-new.php page by going to "Media" > "Add New". – hostingutilities.com May 07 '20 at 15:53

1 Answers1

4

Bitnami Engineer here,

I just launched a fresh Bitnami WordPress instance and modified the following parameters in the /opt/bitnami/php/etc/php.ini file to be able to upload a bigger file to the WordPress plugin.

post_max_size = 200M
upload_max_filesize = 200M

Then I restarted all the services

sudo /opt/bitnami/ctlscript.sh restart
Jota Martos
  • 4,548
  • 3
  • 12
  • 20
  • Oh yes! It has worked. I got really confused and was testing migration in my other site. I switched back to this site and the Import page of the WP Migration plugin states:` ` `Maximum upload file size: 256M` I am GREEN! Thank you for the assist! – rabbit May 07 '20 at 13:38
  • I would point out that only this morning was I confused with my other blog site. I greatly appreciate your helping me solve this issue! I must have reinstalled WordPress at least 20 times, over the past two days. Very good to know how to restart the stack! I went back onto the server and changed the upload_max_filesize and post_max_size back to 40M and restarted. I have my blog back! http://callistohouse.club. I am wondering whether to try the Multisite option... – rabbit May 07 '20 at 15:04
  • I'm glad to hear that :) Enjoy! – Jota Martos May 08 '20 at 07:37