Skip to content

Instantly share code, notes, and snippets.

@99darwin
Created April 22, 2019 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 99darwin/99d80957de75245b601c83810253346d to your computer and use it in GitHub Desktop.
Save 99darwin/99d80957de75245b601c83810253346d to your computer and use it in GitHub Desktop.
Increase max upload size for WordPress site manually

Motivation

You may want to increase the max upload size on your WordPress installation in order to upload a custom theme or larger media files.

Note: This will not work on shared hosting plans. This workaround is only for self-hosted WordPress installations.

How to

From your server, access the php.ini file under your PHP installation directory.

sudo nano /etc/php/<php_version>/apache2/php.ini

Find and replace the following lines with the correct values

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Restart apache to apply the changes

sudo systemctl restart apache2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment