WPMU DEV SEO Memory Allocation error

I get this error when I try to access wpmu-dev-seo for the first time. I just installed it, activated it, and then clicked on the link to configure it.

Fatal error: Allowed memory size of 103809024 bytes exhausted (tried to allocate 65536 bytes) in /wp-content/plugins/wpmu-dev-seo/wds-files/wds-sitemaps/wds-sitemaps.php on line 379

I have ~10,000 posts
I am running WP 3.1 Multisite (it has been upgraded over time from version 2.9)

I have tried:
deactivating all other plugins
using both version 1.0.4 and 1.0.3
completely deleting the seo plugin directory and then re-uploading it
deleted every other plugin that was used for sitemaps and seo

I am running on Media Temples Grid Server witha php memory allocation of 99MB

I see this tag when I look at the page source
<!-- This site is optimized with the WPMU DEV SEO plugin v1.0.3. -->

Any thoughts/ideas on how to correct this would be greatly appreciated.

Thanks,

Adam

  • Aphrodite

    ok this is server related.

    Depending on your host, you can create a php.ini file in the root folder of your site to increase the value. But this is not possible on all hosts.

    If you are on dedicated, just modify the php execution allowed memory value to 128, well 256 :slight_smile:

    If on shared server, ask your host if it is possible and how (each host can have specific syntax/method to personnalize this value, OR NOT....

  • Aaron

    It's because of how many posts you have. Can you please try limiting the posts in the sitemap?
    Edit around line 306 of /wp-content/plugins/wpmu-dev-seo/wds-files/wds-sitemaps/wds-sitemaps.php from
    ORDER BY post_parent ASC, post_modified DESC");
    to
    ORDER BY post_parent ASC, post_modified DESC LIMIT 5000");

    Start with 5000, and if it still runs out of memory drop it down to 4000, then 3000, etc until you get a number you can handle.

    Let me know what that is, then I'll set it in the plugin by default with the ability to override.

  • Aaron

    This is fixed in 1.0.5. Thanks for reporting!

    Basically I've set a default limit in it at 1000 posts for now. I would still really appreciate your testing for the best limit though. Instead of the code above, put
    define( 'WDS_SITEMAP_POST_LIMIT', 5000 );
    then
    define( 'WDS_SITEMAP_POST_LIMIT', 4000 );
    then
    define( 'WDS_SITEMAP_POST_LIMIT', 3000 );
    etc. untill you don't get the error.

    I want the plugin default to be as high as possible for the default WP required 64MB of ram.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.