How to Fix Max Upload Size, Memory Limit, etc in WordPress 2020.

If you have been running a self-hosted WordPress blog or website for some time, you will have to install multiple plugins several times, after installing a new theme, after increasing traffic, or after any other change, Perhaps such errors or notices have occurred.

  • PHP Memory Limit Exhausted
  • PHP Maximum Execution Timeout Error
  • Limited Upload File Size
  • Uploads Disabled
  • Maximum No. of Files Upload Limited आदि.
How to change variables like max upload size, php limit etc. in wordpress (error)

Memory LIMIT Error

So there are many other PHP based variables which sometimes, due to limited values, give you trouble. Let me explain you through an example.

Suppose, you have created your WordPress website on a web hosting, where the RAM limit is actually 1 GB or 1024 MB, but in your server’s php.ini file, this limit is overridden, and there the value of memory_limit PHP variable is 512 Due to MB set, you are not able to take full advantage of 1024 MB. In such a situation, you are able to use at most 50% of your actual available RAM at a time.

The php.ini file is a file created in the root directory of your server that governs the server, using these PHP variables. Now if you have to use all the resources of your server, and run your WordPress website well, then, in this case, you need to go to the file manager of your server, or, by connecting to the server via FTP, php.ini file Have to edit. This work becomes of little advanced scale, because many times, php.ini file is not directly visible to you and due to version changes, you are not able to implement it correctly.

So in this way, today I have come up with a very easy and good user interface for you to manage these variables.

PHP Settings is a very simple plugin that will help you in this task. Install and activate this plugin in your WordPress Blog. (How to install WordPress plugins?)

How to change variables like Max upload size, PHP limit etc. in WordPress (2)

Once you install and activate this plugin, after that, you have to go to Tools> PHP Settings in the WordPress Dashboard , as shown in the screenshot below:

How to change variables like Max upload size, PHP limit etc. in WordPress (1)

After this, its interface will open in front of you. Its interface is explained in the screenshot below. If there are no variables set in your php.ini, then the editor window will be blank.

How to change variables like Max upload size, PHP limit etc. in WordPress (3)

Next, you have to go to the tab with settings. In this tab, there will be a list of all the PHP variables or say directives, which you can edit. The directives that are already overridden in the php.ini files of your server will be mentioned in the label next to them, as the 3 directives are labeled in the screenshot below. The list of these directives is quite long, so by using the search bar given above, you can easily find the directive whose value you have to set.

How to change variables like Max upload size, PHP limit etc. in WordPress (4)

In the corresponding checkboxes of the variables you want to set, you have to tick and then click on the Copy To Editor button given above.

Note: I have noted that this Copy To Editor option works many times in such a way that you have to check the variables you have to set first and then uncheck, click the Copy To Editor button. So you try to understand this process a little.

When you complete the above step, come back to the editor window again and then whatever value you want to set for a directive. As you can see in the screenshot below, I have set the value of 3 variables.

  • memory_limit = 3072M (RAM limit to 3 GB or 3072 MB {1 GB = 1024 MB} )
  • post_max_size = 80M (maximum size of a single post to 80 MB)
  • upload_max_filesize = 256M (maximum size for uploading a single file to 256 MB)
How to change variables like Max upload size, PHP limit etc. in WordPress (6)

Don’t forget to save the settings by clicking on the Save Settings button!

Subscribe to keep reading more similar informational posts and to get notifications about new blog posts. Comment below to ask any kind of question related to this blog post.


What do you think?

Written by Editorial Staff

Editorial Staff at Digitalvision is a Team of Experts led by Adi Kataria. and also check out our SEO tools website


Leave a Reply

Your email address will not be published. Required fields are marked *



10 On-Page SEO Tips to rank on google first page

DreamHost Review Is DreamHost a Good Choice For You in 2020