Table Of Contents

Very Important Notes

Backup Your Website

Please, arrange a full backup of your website before you follow or apply any section from this guide.

Contact Your Hosting Provider

Make sure to contact your hosting provider if you are not sure about a certain option or feature.

Call An Expert Technical Assistant

If you are not exactly sure what you are doing, please seek an expert technical assistant to help you with your query. This guide is only provided for reference purposes. The sections written below may or may not work on your server depending on your configurations, hosting provider limitations, and settings.

Increase The WP Memory Limit

What Is WP Memory Limit?

The WP Memory Limit is the maximum amount of memory (RAM) that your website can use at one time. When your site reaches the allocated memory limit, you will encounter a fatal error.

There are several factors that contribute to the consumption of your memory. The notable ones are your WordPress itself, the theme that you are using, and the list of active plugins. Generally speaking, the bigger and more complex your website is, the more memory it needs.

Why Do I Need To Increase My WP Memory Limit?

The default memory limit for WordPress is 32MB. This limit might be enough for small websites with limited number of plugins and visitors. However, if you need to install a fully functional demo of a premium theme or you have a large list of custom plugins that require installation, then increasing your memory limit would be a wise action to take.

Basically, when you start encountering the "Fatal Error: Memory Size Exhausted", it would be the right time for you to make such changes.

How To Increase The WP Memory Limit?

Please check the notes section before applying any step from this tutorial.
Our recommended value for the WordPress Memory Limit is: 256MB.

Method 1 - Change The WP Memory Limit Using The ( php.ini ) File

Increase WP Memory Limit - PHP INI
  • Step 1 – Find or locate your php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.
  • Step 2 – If Open your php.ini file then edit it using your favourite editor as follows:

    - Find the line of: memory_limit = 32M
    - Change the 32M or any number you find there to your desired limit (e.g. 256M).

    Note: If you have created your own php.ini file, then you need add to the file the code line below:
    memory_limit = 256M
  • Step 3 – Save your changes and reboot your local host or server.

Important Note: Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host. It is good to note as well that this method only affects your PHP memory limit.

Method 2 - Change The WP Memory Limit Using The ( wp-config.php ) File

Increase WP Memory Limit - WP-CONFIG
  • Step 1 – Find your wp-config.php file in the root directory of your WordPress installation.
  • Step 2 – Open the wp-config.php file with a text editor then locate the line that includes:
    define('WP_DEBUG', false);

    Then add after it, the below line of code:
    define ('WP_MEMORY_LIMIT', '256M');
  • Step 3 – Save the wp-config.php file then refresh your website.

Method 3 - Change The WP Memory Limit Using The ( .htaccess ) File

Increase WP Memory Limit - HTACCESS
  • Step 1 – Search for your .htaccess file which should be located in the root directory of your WordPress installation. If you can't find it then it might be hidden. Thus, make sure to check your hidden files when locating it.
  • Step 2 – Open the .htaccess file with a text editor and add the following line of code:
    php_value memory_limit 256M
  • Step 3 – Save the .htaccess file then refresh your website.

Increase The Maximum File Upload Size

What Is The Maximum File Upload Size?

It is the maximum allowed size for a file to upload to your WordPress website. A file can be a plugin, theme, image, audio, video, or any other kind of file. The default size is 2MB which is considered by many webmasters a very low upper limit for the allowed upload file size.

Why Do I Need To Increase My Maximum File Upload Size?

If you upload big images, audio/video, or plugin files that surpasses the default limit, then it might be easier for you to increase your maximum file upload size along with your maximum post size instead of constantly using the FTP manager.

How To Increase The Maximum File Upload Size?

Please check the notes section before applying any step from this tutorial.
Our recommended value for the Maximum File Upload Size is: 64MB.

Method 1 - Change The Maximum File Upload Size Using The Theme ( functions.php ) File

Increase Upload Max Size - Theme Functions
  • Step 1 – Open your theme files and locate the functions.php file. You can also contact your theme developer for assistance if required.
  • Step 2 – Add the below code lines to the file:
    @ini_set('upload_max_size' , '64M');
  • Step 3 – Save the functions.php file then refresh your website.

Method 2 - Change The Maximum File Upload Size Using The ( php.ini ) File

Increase Upload Max Filesize - PHP INI
  • Step 1 – Find or locate your php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.
  • Step 2 – If Open your php.ini file then edit it using your favourite editor as follows:

    - Find the line of: upload_max_filesize = 2M
    - Change the 2M or any number you find there to your desired limit (e.g. 64M).

    Note: If you have created your own php.ini file, then you need add to the file the code line below:
    upload_max_filesize = 64M
  • Step 3 – Save your changes and reboot your local host or server.

Important Note: Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.

Method 3 - Change The Maximum File Upload Size Using The ( .htaccess ) File

Increase Upload Max Filesize - HTACCESS
  • Step 1 – Search for your .htaccess file which should be located in the root directory of your WordPress installation. If you can't find it then it might be hidden. Thus, make sure to check your hidden files when locating it.
  • Step 2 – Open the .htaccess file with a text editor and add the following line of code:
    php_value upload_max_filesize 64M
  • Step 3 – Save the .htaccess file then refresh your website.

Increase The Maximum Post Size

What Is The Maximum Post Size?

It is the maximum size of allowed post data. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.

Why Do I Need To Increase My Maximum Post Size?

If you upload big images, audio/video, or plugin files that surpasses the default limit, then it might be easier for you to increase your maximum post size along with your maximum file upload size instead of constantly using the FTP manager.

How To Increase The Maximum Post Size?

Please check the notes section before applying any step from this tutorial.
Our recommended value for the Maximum Post Size is: 64MB.

Method 1 - Change The Maximum Post Size Using The Theme ( functions.php ) File

Increase Post Max Size - Theme Functions
  • Step 1 – Open your theme files and locate the functions.php file. You can also contact your theme developer for assistance if required.
  • Step 2 – Add the below code lines to the file:
    @ini_set( 'post_max_size', '64M');
  • Step 3 – Save the functions.php file then refresh your website.

Method 2 - Change The Maximum Post Size Using The ( php.ini ) File

Increase Post Max Size - PHP INI
  • Step 1 – Find or locate your php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.
  • Step 2 – If Open your php.ini file then edit it using your favourite editor as follows:

    - Find the line of: post_max_size = 32M
    - Change the 32M or any number you find there to your desired limit (e.g. 64M).

    Note: If you have created your own php.ini file, then you need add to the file the code line below:
    post_max_size = 64M
  • Step 3 – Save your changes and reboot your local host or server.

Important Note: Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.

Method 3 - Change The Maximum Post Size Using The ( .htaccess ) File

Increase Post Max Size - HTACCESS
  • Step 1 – Search for your .htaccess file which should be located in the root directory of your WordPress installation. If you can't find it then it might be hidden. Thus, make sure to check your hidden files when locating it.
  • Step 2 – Open the .htaccess file with a text editor and add the following line of code:
    php_value post_max_size 64M
  • Step 3 – Save the .htaccess file then refresh your website.

Increase The Maximum Execution Time ( PHP Time Limit )

What Is The Maximum Execution Time?

The PHP Maximum Execution Time or PHP Time Limit is the amount of time in seconds that your website will spend on a single operation before timing out. This is useful to avoid any potential server lockup. The default value of the PHP Time Limit is 40 seconds. When a certain operation reaches this execution time limit, the system will return the following fatal error:
Maximum execution time of X seconds exceeded. ( Where "X" is the value ).

Why Do I Need To Increase My Maximum Execution Time?

If you installing a big plugin or a complete demo for a theme, then the default value of 40 seconds might not be enough to complete the operation. You can also increase your PHP time limit temporary then decrease it back after the completion of your long operations.

How To Increase The Maximum Execution Time?

Please check the notes section before applying any step from this tutorial.
Our recommended value for the Maximum Execution Time is: 300.

Method 1 - Change The Maximum Execution Time Using The ( php.ini ) File

Increase PHP Max Execution Time - PHP INI
  • Step 1 – Find or locate your php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.
  • Step 2 – If Open your php.ini file then edit it using your favourite editor as follows:

    - Find the line of: max_execution_time = 40
    - Change the 40 or any number you find there to your desired limit (e.g. 300).

    Note: If you have created your own php.ini file, then you need add to the file the code line below:
    max_execution_time = 300

Important Note: Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.

Method 2 - Change The Maximum Execution Time Using The ( wp-config.php ) File

Increase PHP Maximum Execution Time - WP-CONFIG
  • Step 1 – Find your wp-config.php file in the root directory of your WordPress installation.
  • Step 2 – Open the wp-config.php file with a text editor then locate the line that includes:
    define('WP_DEBUG', false);

    Then add after it, the below line of code:
    set_time_limit(300);
  • Step 3 – Save the wp-config.php file then refresh your website.

Method 3 - Change The Maximum Execution Time Using The Theme ( functions.php ) File

Increase PHP Max Execution Time - Theme Functions
  • Step 1 – Open your theme files and locate the functions.php file. You can also contact your theme developer for assistance if required.
  • Step 2 – Add the below code lines to the file:
    @ini_set('max_execution_time', '300');
  • Step 3 – Save the functions.php file then refresh your website.
  • Step 3 – Save your changes and reboot your local host or server.

Method 4 - Change The Maximum Execution Time Using The ( .htaccess ) File

Increase PHP Max Execution Time - HTACCESS
  • Step 1 – Search for your .htaccess file which should be located in the root directory of your WordPress installation. If you can't find it then it might be hidden. Thus, make sure to check your hidden files when locating it.
  • Step 2 – Open the .htaccess file with a text editor and add the following line of code:
    php_value max_execution_time 300
  • Step 3 – Save the .htaccess file then refresh your website.

Increase The 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.

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

Increasing the PHP Max Input Vars helps in solving some issues related to your menus. If your menu items are not saving successfully or the last entries are being truncated or left off, then increasing this value will be a recommended action. This is especially useful when you are installing a big demo for a theme with lots of menu entries.

How To Increase The PHP Max Input Vars?

Please check the notes section before applying any step from this tutorial.
Our recommended value for the PHP Max Input Vars is: 2000.

Method 1 - Change The PHP Max Input Vars Using The ( php.ini ) File

Increase Max Input Vars - PHP INI
  • Step 1 – Find or locate your php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.
  • Step 2 – If Open your php.ini file then edit it using your favourite editor as follows:

    - Find the line of: max_input_vars = 1000
    - Change the 40 or any number you find there to your desired limit (e.g. 2000).

    Note: If you have created your own php.ini file, then you need add to the file the code line below:
    max_input_vars = 2000

Important Note: Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.

Method 2 - Change The PHP Max Input Vars Using The ( .htaccess ) File

Increase PHP Max Input Vars - HTACCESS
  • Step 1 – Search for your .htaccess file which should be located in the root directory of your WordPress installation. If you can't find it then it might be hidden. Thus, make sure to check your hidden files when locating it.
  • Step 2 – Open the .htaccess file with a text editor and add the following line of code:
    php_value max_input_vars 2000
  • Step 3 – Save the .htaccess file then refresh your website.

Increase The PHP Max Input Time

What Is The PHP Max Input Time?

The PHP Max Input Time sets the maximum time in seconds a script is allowed to parse input data, like POST and GET. Timing begins at the moment PHP is invoked at the server and ends when execution begins.

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

Increasing the PHP Max Input Time helps in solving issues when uploading large files or installing a big demo of a premium theme.

How To Increase The PHP Max Input Time?

Please check the notes section before applying any step from this tutorial.
Our recommended value for the PHP Max Input Time is: 1000.

Method 1 - Change The PHP Max Input Time Using The ( php.ini ) File

Increase Max Input Time - PHP INI
  • Step 1 – Find or locate your php.ini file. If you can not find it, then simply create your own php.ini file and place it in the root directory of your WordPress installation.
  • Step 2 – If Open your php.ini file then edit it using your favourite editor as follows:

    - Find the line of: max_input_time = 120
    - Change the 120 or any number you find there to your desired limit (e.g. 1000).

    Note: If you have created your own php.ini file, then you need add to the file the code line below:
    max_input_time = 1000

Important Note: Many shared hosting providers restrict you from accessing the php.ini file. This method is only applicable in case you have direct access to your php.ini file or if you are running your WordPress on a local host.

Method 2 - Change The PHP Max Input Time Using The ( .htaccess ) File

Increase PHP Max Input Time - HTACCESS
  • Step 1 – Search for your .htaccess file which should be located in the root directory of your WordPress installation. If you can't find it then it might be hidden. Thus, make sure to check your hidden files when locating it.
  • Step 2 – Open the .htaccess file with a text editor and add the following line of code:
    php_value max_input_time 1000
  • Step 3 – Save the .htaccess file then refresh your website.

Summary

Name

Recommended Value

WP Memory Limit

256MB

Max Upload File Size

64MB

Max Post Size

64MB

Max Execution Time

300

PHP Max Input Vars

2000

PHP Max Input Time

1000

Section 2 - Summary Of Changes To ( wp-config.php )

WP System Status - Adjusting WP-CONFIG

define ('WP_MEMORY_LIMIT', '256M');
set_time_limit(300);

Section 3 - Summary Of Changes To ( php.ini )

WP System Status - Adjusting PHP INI

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_vars = 2000
max_input_time = 1000

Section 4 - Summary Of Changes To ( .htaccess )

WP System Status - Adjusting HTACCESS

php_value memory_limit 256M
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_vars 2000
php_value max_input_time 1000

Section 5 - Summary Of Changes To The Theme's Functions

WP System Status - Adjusting Theme Functions

@ini_set('upload_max_size' , '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');

24/05/2017
Increase WordPress System Status Limits

How To Increase WordPress System Status Limits

Learn how to increase your WP Memory Limit, Upload Max Filesize, Max Post Size, Max Execution Time, PHP Max Input Vars, and PHP Max Input Time. Your complete comprehensive guide for fixing and increasing your WordPress system status limits.
07/06/2017
Social Marketing Guide

Ultimate Social Marketing Guide

The Best Complete Guide To Social Marketing (SMM). Covering Facebook, Twitter and Google+. Learn How To Drive Social Traffic Today!
14/06/2017
Google Play ASO Guide

Ultimate Google Play ASO Guide

The best comprehensive Google Play App Store Optimization (ASO) guide for 2017. Learn how to optimize your app properly and drive more traffic and installs.
21/06/2017
Link Building Guide

Ultimate Link Building Guide

The Best Complete Guide to Off-Page SEO and Link Building. Master The Art Of Creating Quality Backlinks and Enhance Yours Rankings Today!
28/06/2017
WordPress Installation Guide

WordPress Installation Guide

Learn How To Install WordPress Quickly and Easily. This Guide Will Teach You Everything You Need To Know To Install WordPress And Configure It Properly.
05/07/2017
WordPress Speed Optimization Guide

How To Increase The Speed Of WordPress

Learn How To Increase The Speed Of WordPress Websites and Decrease Their Loading Time. Your Ultimate WP Speed Optimization Guide Is Here!