Anything About Wordpress

Adjust your wordpress website speed

WP Memory Limit

What Is The WP Memory Limit?

The WP Memory Limit is the maximum amount of memory (RAM) that your site can use at one time. When you reach your Memory Limit, you’ll encounter a fatal error. Several things consume memory, such as WordPress itself, the theme you’re using, and the plugins installed on your site. Basically, the more content and features you add to your site, the higher your memory limit has to be.

Why Do I Need To Increase My WP Memory Limit?

There are a number of factors that may affect how much memory your website will need such as content, themes, plugins, etc. The default memory limit for WordPress is 32MB. If you’re only running a small site with basic functions, this default value is more than enough. However, once you start encountering ‘Fatal Error: Memory Size Exhausted…, it may be time to adjust your memory limit.

The WP Memory Limit is the maximum amount of memory (RAM) that your site can use at one time. When you reach your Memory Limit, you’ll encounter a fatal error. Several things consume memory, such as WordPress itself, the theme you’re using, and the plugins installed on your site. Basically, the more content and features you add to your site, the higher your memory limit has to be.

Step 1 – Locate your PHP.ini file. If you can’t find it, then you can create your own PHP.ini file in the root folder of your WordPress installation.

Step 2 – If you find your existing PHP.ini, open the file and locate the following line of code (xx represents a number):Copy to Clipboard1

memory_limit = xxM;

Then change xxM to your desired limit. For example, 256M.

Step 3 – If you created your own PHP.ini file, then add the same code inside it:Copy to Clipboard





1

memory_limit = 256M;

Simply change the value to the recommended value. For example, 256M.

Step 4 – Save your changes, and reboot your local host or server.

PHP Time Limit

What Is The PHP Time Limit?

the PHP Time Limit is the amount of time (in seconds) that your site will spend on a single operation before timing out. This is also to avoid server lockups. The default value for the PHP Time Limit is 30 seconds. When an operation reaches the time limit set, then it will return a fatal error that looks like thisCopy to Clipboard





1

Fatal error: Maximum execution time of xx seconds exceeded...

Why Do I Need To Increase My PHP Time Limit?

Because the default value is only 30 seconds, you will most likely receive a fatal error when running longer operations. We recommend changing your PHP Time Limit to at least 180 seconds, or to 300 seconds depending on what your host allows.

How To Increase The PHP Time Limit

Step 1 – Locate your PHP.ini file. If you can’t find it, then you can create your own PHP.ini file in the root folder of your WordPress installation.

Step 2 – If you find your existing PHP.ini, open the file and locate the following line of code (xx represents a number):Copy to Clipboard





1

max_execution_time = xx;

Then change xx to your desired limit. For example, 300.

Step 3 – If you created your own PHP.ini file, then add the same code inside it:Copy to Clipboard





1

max_execution_time = 300;

Simply change the value to the recommended value. For example, 300.

Step 4 – Save your changes, and reboot your local host or your server.

PHP Max Input Vars

What Is The PHP Max Input Vars?

The PHP Max Input Vars is the maximum number of variables your server can use for a single function to avoid overloads. The default value of the PHP Max Input Vars is 1000, while the recommended value is 1540. This limitation will truncate some post data such as your menu items which causes issues like your menu items aren’t saving or being left off.

Why Do I Need To Increase My PHP Max Input Vars?

You may need to increase your PHP Max Input Vars if you’re running into issues with your menu. If your menu items aren’t saving properly, or if the last few menu items are being left off, this is most likely because your PHP Max Input Vars value is too low. We recommend your PHP Max Input Vars to be 1540 in order to load all the Classic Demo’s menu items.


Leave a Reply

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