how to increase upload size for my WordPress site

April 3, 2019 372 views
WordPress PHP

I am migrating my WordPress and I am using All in One Migration plugin. I need to restore my backup and the file size is 1.4 GB, but with default setting, I can only upload to max 16 MB.

I have tried to locate "max_filesize" under php.ini but I can't find it.

This is my first time using DigitalOcean and I am not sure how things work here.

The command I used to go to my php.ini is - sudo nano /etc/php5/apache2/php.ini

Please suggest me how to solve this problem.

1 Answer
jarland MOD April 3, 2019
Accepted Answer

Greetings!

You can absolutely increase the upload limit, but I would not recommend it for that size migration. If you manage to kill every timeout that would hit before you hit 1.4GB, you've effectively optimized your server to cause problems later. If a plugin hangs for any unknown reason later, you want it to kill the process with a reasonable timeout rather than stack until you're out of memory (followed by the kernel killing MySQL for OOM, every single time).

I would instead recommend that you copy your wp-content folder from your other hosting location, and upload it over SFTP to overwrite the wp-content folder on your server here. Then take a backup of your MySQL database and import it. This is an old guide but it's advice remains sound:

https://www.digitalocean.com/community/tutorials/how-to-migrate-wordpress-from-shared-hosting-to-a-cloud-server-with-zero-downtime

With that said, you can find information about increasing upload limits here:
https://www.cloudways.com/blog/increase-media-file-maximum-upload-size-in-wordpress/

Jarland

by Ramesh Jha
If you read through this article you'll have the knowledge to migrate your WordPress site from Shared Hosting to a Cloud Server with zero downtime.
  • Thank you Jarland, I really appreciate your answer, I will surely try to do that. Thank you again. :)

Have another answer? Share your knowledge.