• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How to Increase the WordPress Upload Size Limit (Ubuntu, Apache, MPM Event)

By Abhishek Ghosh May 11, 2023 5:09 am Updated on May 11, 2023

How to Increase the WordPress Upload Size Limit (Ubuntu, Apache, MPM Event)

Advertisement

To follow this guide, your WordPress is required to be installed on a VPS or a cloud server or a dedicated server with root privileges on SSH. This guide does not apply to WordPress sites that are using shared hosting (such users can use WordPress plugins which increases the limit).

LAMP server customization is complicated since not everything is documented clearly. It is common to try changing the value of the upload_max_filesize directive in some php.ini without any effective result. This article will address the two errors while trying to change the value.

 

Changing Value of Which php.ini File Will Work?

 

In the whole system, there are 3-4 php.ini files. Normally, we do not use PHP’s built-in server. Depending on the module in use, the settings of a specific php.ini file get honoured because the way of utilizing PHP becomes different. SSH to your server, and change the directory to /etc :

Advertisement

---

Vim
1
cd /etc

Run this command to view the path of the php.ini files which have the phrase “post_max_size”:

Vim
1
grep -rl "post_max_size" | xargs ls -lrth

You’ll get an output like this:

Vim
1
2
3
4
5
-rw-r--r-- 1 root root 71K Feb 14 13:27 php/7.2/fpm/php.ini
-rw-r--r-- 1 root root 71K Feb 14 13:27 php/7.2/embed/php.ini
-rw-r--r-- 1 root root 71K Feb 14 13:27 php/7.2/cgi/php.ini
-rw-r--r-- 1 root root 71K Apr 17 10:37 php/7.2/apache2/php.ini
-rw-r--r-- 1 root root 70K May  2 15:18 php/7.2/cli/php.ini

When you are using mod_php and mpm prefork, then editing the /etc/php/7.2/apache2/php.ini should work.
When you are using php-fpm and MPM Event, then editing the /etc/php/7.2/fpm/php.ini should work.
For wider compatibility, you have to edit all the php.ini files.

How to Increase the WordPress Upload Size Limit

 

What to Change?

 

You have to change the values of at least these three directives:

Vim
1
2
3
memory_limit
post_max_size
upload_max_filesize

Where the value of memory_limit > max_post_size >= upload_max_filesize. For example, you can set the values 10MB, 8MB, 6MB or 8MB. For example:

Vim
1
2
3
memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M

Depending on your setup, run the appropriate commands to test and gracefully restart Apache:

Vim
1
2
3
apachectl configtest
service php7.2-fpm restart
sudo /etc/init.d/apache2 reload

Check WordPress for upload size. It should be fixed now.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Increase the WordPress Upload Size Limit (Ubuntu, Apache, MPM Event)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Optimize php ini for Rackspace Cloud Server (PVHVM)

    Here is a quick guide to optimize php ini for Rackspace Cloud Server (PVHVM) for higher performance and lower page loading speed.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy