I keep getting this on my WordPress site after I moved it from my development server to the live site. It's happening in one file that is using a few functions which I think is causing it, but I don't know how to fix it.

Allowed memory size of 268435456 bytes exhausted (tried to allocate 452314848 bytes) in Unknown on line 0

The code of the file that is causing the problem is here: custom.php

I think it is one of these functions: ob_flush() or ob_end_flush().

How this started happening:

I finished development of the site using WordPress MU (only 2 blogs in the network), originally I had it working with sub-directories. Once I moved it to the live server, I switched to sub-domains and got them working fine (both sites are showing) but I am getting that error in custom.php, causing some JavaScript to stop functioning.

By the way, this only happens about 85% of the time, not every time the error shows.

Let me add that I am customizing a theme called Repro, if it is of any relevance. Anyways, if anyone can help me troubleshoot on why this is happening, and what I can do to fix it, I would be very grateful, thanks!

Things I have tried:

Increasing the memory limit using define('WP_MEMORY_LIMIT', '1024M'); in wp-config.php. - No luck

Switching themes - The problem only persists on the Repro theme

link|improve this question

feedback

2 Answers

up vote 0 down vote accepted

Clearly, this is an issue specific to the Theme. You should consult the developer and/or ThemeForest for Theme-specific solutions. As this is a commercial Theme, we have no way of seeing the Theme files, or of helping to troubleshoot.

link|improve this answer
feedback

Try switching to a different theme to see if the problem still persists. If it doesn't, activate your theme again. That's worked for me before, though I'm not sure why.

link|improve this answer
Just tried this, it does not show the error on TwentyEleven, but when I switch back to the theme that I need to use, the problem comes back. – Jared Jan 18 at 12:04
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.