WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

closed as too localized by Chip Bennett, Jared, Wyck, Brian Fegter, kaiser Sep 13 '12 at 15:31

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 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.

share|improve this answer

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.

share|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 '12 at 12:04

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