Hello.
I cannot upload my WordPress backup file because it is 135 MB. I want to increase the upload size from the wp-config.php file.
Can anyone tell me how to edit the file? Please help me ASAP. Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello @vamsisnorkler
This question was answered some time ago in the community, I’ll leave the link to the question below
https://www.digitalocean.com/community/questions/increase-max-filesize-for-wordpress-files-one-click-installation
@Sternenfisch
WordPress relies on your PHP configuration, so if PHP isn’t configured to allow uploads of that size, WordPress will throw an error.
You’ll want to modify your PHP’s
php.ini
file and change:and
The defaults are 2MB and 8MB, so we can adjust those to something higher for your needs. I’d set them as:
and
If you’re using NGINX instead of Apache, there’s a variable in NGINX’s main configuration file that you may also need to change as it also limits the size of uploads, that’d be:
You’d need to define that and set it to 64M as well.
You’d then restart Apache, or restart both NGINX and PHP-FPM. It just depends on which you’re using.
Regards
Hi @vamsisnorkler,
In order to increase the upload size of your WordPress installation, you need to edit the php.ini of your Droplet and increase two values - upload_max_filesize and post_max_size.
If you do not know how to access your php.ini, SSH to your Droplet get into your website’s directory:
Once you create the info.php file, open it and type in the following:
Save the file and exit. Next open it in your browser like so - https://example.com/info.php
where example.com is your domain name.
In there you’ll see the loaded configuration path. Once you see it, copy it and in your SSH type in
In there increase the values of both upload_max_filesize and post_max_size. Once done, save the file and exit.
One last thing to do is restart Apache
That should be it.
Thanks for your responses.