Upgrade your WordPress Memory Limit in 6 Simple Steps

By |2017-08-09T22:23:50-04:00September 12th, 2016|Web Design, Tips & Tricks|0 Comments

So you got a memory error, something like:

“Fatal error: Allowed memory size of 12345678 bytes exhausted (tried to allocate 2345678 bytes) in /home/your-username/public_html/wp-includes/plugin.php on line…”

Don’t worry. You’ll be fine.

Themes are getting more robust and require more resources than the default limit WordPress gives you.  And it appears that different hosts have different requirements, making it even more fun.  Also, different blogs have different levels of expertise in showing you how to do it.  Many say “Try this” or “try that, and if those don’t work, call your host.”  Gee, thanks.  Many sites do tell you what lines of code you need to add, but not WHERE – which matters as much as the lines themselves.  Enough of my whining.

I will not assume you are a deep-level coder, but that you do know enough to do something like this.

Here’s how to upgrade the WordPress memory limit for sites on a GoDaddy Linux shared hosting environment, as of July 2016.

Step 1:

Make a full back-up of your files. It’s just a good habit to always do so before changing anything. If you don’t know how to do this you probably shouldn’t be messing with this.

Step 2:

Make a .zip copy of the back-up you just made. This gives you a fall-back option “just in case.”

Step 3:

In those backed-up files, locate a file in the root directory called “wp-config.php”. When you’ve located it, open it in your favorite code editor.

Step 4:

Add these 2 lines of code (I will show you where in Step 5):

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );

Step 5:

HERE. Yes, it matters. Put it a couple lines below the WP_DEBUG line.

WordPress Memory Limit Upgrade Code Placement
You’ll notice I didn’t say anything about php.ini or php5.ini files.  They don’t matter on GoDaddy’s Linux shared hosting environment.

Step 6:

Now, get back to work.

I hope this was helpful.


Leave A Comment

All rights reserved © Company Name, 2014
Dolor aliquet augue augue sit magnis, magna aenean aenean et! Et tempor, facilisis cursus turpis tempor odio, cursus montes ac turpis. Ultrices! Massa integer augue ridiculus adipiscing, massa cras pid. Turpis placerat scelerisque, vut odio mus non, mattis porttitor, nunc odio, turpis tortor sit? Pid amet, sed facilisis.
  • Goblinus globalus fantumo tandempo
  • Scelerisque cursus dignissim donus
  • Montes vutario lacus quis arcupolisio
  • Leftomato denitro oculus tepircos den
  • Spiratio dodenus christmas popupius
  • Afrenius globalus spiritum tandempo
  • Fitatos vutario lacus quis arcup delis
All rights reserved © Duffweb, 2017
And GET 10% OFF
any work we do for you!
  • Tips on Design
  • How to Convert More Visitors
  • Secrets to Exploding Sales
  • 10 Critical Mistakes to Avoid
  • Facebook & Google PPC Hacks