How to increase the maximum upload file size in WordPress
In this post I guide how to increase maximum upload file size in Wordpress from 2mb to 64mb.
Before my way I tried to:
- Create php.ini to WordPress root and to wp-admin
- Modify .htaccess file
- Modify themes function.php
Nothing of these were working, but then I found a way what really worked. I hope this helps you too.
In my server setup I have been installed Ubuntu 12.04, other parts of LAMP and Wordpress. Here is instructions to:
How to install LAMP and How to install WordPress
Finding your php configurations
As you can see my maximum upload file size is 2mb.
First you need to know where your php configurations is. Create info.php under your wp-admin.
In info.php add these lines. This is just normal phpinfo.
Goto to site: yourdomain.com/wp-admin/info.php. Example I go to:
Here you can see where php configurations are.
Change php configurations
There are couple ways to modify php configurations. One way is to modify php.ini. Other safer way is to add in conf.d folder new ini file that overwrites php.ini configurations. This way you don’t need to touch php.ini.
Go to where your “Scan this dir for additional .ini files” points and create new file upload.ini
In this upload.ini add these lines
Then restart your apache
In php info you can see the new conf.d file have been added.
Go to your media and see that maximum upload size have been increased.
Remember to delete your info.php that you created at beginning of this post.