Do you need to increase your WordPress memory limit?
Did you try uploading a plugin or theme and get a message like this…
Fatal error: Allowed memory size of [some number] bytes exhausted
Depending on your hosting provider and environment there are a couple ways to resolve this issue.
However, the solution is the same, you need to increase the PHP memory size.
Some hosting providers purposely set this limit to a low number because when you’re in a shared environment, what you do affects others on the server.
I’ll show you two ways to increase the memory size.
- In cPanel (not everyone will have this options)
- Using php.ini, user.ini or .user.ini file (everyone can use this method)
cPanel Memory Limit Change
If your hosting account has cPanel, you’ll be able to do this real easily with a few clicks of your mouse.
I’ll show you how I do this with my GoDaddy account, but if you have cPanel you’ll do the same steps, just start by logging into a different hosting provider.
Step 1 – Get to cPanel
Step 2 – Search for PHP & Click “Select PHP Version”
Step 3 – Change PHP Version
If you’re not on version 5.6 change that first. Select the version and click “Set as Current”.
Step 4 – Click on “Switch to PHP Options”
Step 5 – Locate memory_limit
In the drop down to the right select any of the options, typically 128M or 256M is plenty.
Step 6 – Don’t forget to click “Save”
Step 7 – Refresh and try agin
Refresh the page in WP Admin and try the upload again. You should be able to get the upload done no problem.
PHP.ini or User.ini WordPress Memory Limit Change
Some hosting environments work better with php.ini and others user.ini. To know which is best for yours, you can call your hosting provider and ask, or just try both and see which one works.
Some hosting providers (GoDaddy cough-cough) will charge you $30 bucks to do this for you.
With a little effort and a smart Google search you could find the exact code, but some people just don’t want to apply the effort.
Lucky for you…I’ve not only provided the code here but a file you can download and upload into your hosting account.
If you rather not do this yourself. Order a One-Time-Fix and I’ll add the file and get your theme uploaded for you.
Step 1. Download these files
- php.ini
- user.ini
- .user.ini (for this one, just download user.ini and once uploaded to your hosting account, rename to .user.ini)
Step 2. Upload it to your root directory.
You’ll need to access the file manager in your cPanel or do this in FTP.
Step 3. Refresh WP Admin page and try the upload again.
If that doesn’t work you might not be uploading the right folder. You will need to talk to the theme developer or Order a One-Time-Fix, and let me handle it for you.
Questions?
If you have questions or need a little more guidance, use the comments below and I’ll be sure to what I can to further assist.