How to set variables like WordPress Me Max_File_Size, Memory_Limit?

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 changes, Perhaps such errors or notices have occurred.

How to change variables like Max Upload Size, Memory Limit etc. in WordPress

  • PHP Memory Limit Exhausted
  • PHP Maximum Execution Timeout Error
  • Limited Upload File Size
  • Uploads Disabled
  • Maximum No. of Files Upload Limited etc.
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 Will 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, in the WordPress dashboard Tools> PHP Settings Go to, 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 this Copy To Editor option, many times it works such that you have to check the variables you have to set first and then uncheck, you have to 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 3 GB or 3072 MB {1 GB = 1024 MB} to do)
  • 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)

Save Settings Don't forget to save the settings by clicking on the 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.

Let me know if you have any questions related to this post?

Must read:

To show your happiness and excitement about our post, please post this post like Social Networks Facebook, Google+ and Twitter Share on etc.

Subscribe for more such videos

LEAVE A REPLY

Please enter your comment!
Please enter your name here