How to Increase Memory Limits on Managed WordPress Hosting

Increase Memory Limit. (mhthemes.com)

HARIANACEH.co.id — We’re using the amazing theme on several sites at the moment and it comes with an easy-to-read System Status page that gives you all kinds of details that you shouldn’t really care about.

We mean, who cares about this stuff? WordPress environment and memory loads, PHP time limits and PHP Max Input Vars. What is that stuff? No one cares until you get little warnings in red that say that things aren’t quite as good as you hoped they were.

We’re using Hostgator’s Managed WordPress Hosting, which has been a great value for the money, but System Status page was giving us a few red warnings. It took some hunting, but we managed to fix them.

Fixing the “WP Memory Limit” and “PHP Time Limit” warnings

  1. Create a .user.ini file
  2. Add this code: max_input_vars = 5000
  3. Place it in your root folder (e.g. public_html)
  4. Save file

Fix the “PHP Time Limit” and “PHP Max Input Vars” warnings

Add these lines to your wp-config.php

define( 'hai_MEMORY_LIMIT', '256M' );

Note that it took some hours (I checked the next day) before the change kicked in.

Eventually, our System Status page looks happy with green numbers instead of red.

Increase WordPress Memory Limit
Increase WordPress Memory Limit

Update Jan. 2016:

Found this code, too. So, do we use ” = ” or ” : ” ?

file_uploads = On
post_max_size = 1024M
upload_max_filesize = 128M
memory_limit = 256M
max_execution_time = 300
max_input_vars = 5000


memory_limit: 256M
max_execution_time: 300
max_input_time: 60
post_max_size: 200M
max_input_vars: 100000
file_uploads: On
max_file_uploads: 20
upload_max_filesize: 200M

Source: likoma.com

Sedang Loading...