How to increase wp_memory_limit and wp_max_memory_limit on Dreamhost

This post is for anyone looking for a solution on how to increase the php memory allotment for your wordpress installation by updating the php.ini or phprc file. Instead of the standard php.ini file, dreamhost uses a phprc file that can be located in your main directory under .php.

The file will be located in your root directory and will have folders for each version of php. Depending on the version you are currently running you will want to edit the phprc file. If you do not have these folders or files, you can simply create them and add your own phprc file. This file needs to be named “phprc” and should not end with an extension. The default contents are:

; {{{ The following lines were automatically added by DreamHost
zend_extension=opcache.so
; }}} That’s all from DreamHost

Once you have the file opened, you will want to add these two lines. Depending on the limits required the numbers below can be adjusted.

wp_memory_limit = 128M
wp_max_memory_limit = 256M

And that’s it! Save the file and you should be able to refresh your wordpress install and notice the changes within a few minutes. To check your memory usage and WP memory limit, you can use the Server IP & Memory Usage plugin.

To be clear I am not associated with Dreamhost, but wanted to share what I have learned.

Leave a Reply