1

I was wondering if someone could suggest a way around the dreaded WP fatal error of memory usage.

I have around 10,000 pages and had no issue at 8000. It's only the back end > pages that is giving the error.

Is there anyway of optimizing the database or something else?

6
  • Contact WordPress support for this. Commented Nov 25, 2016 at 16:01
  • It will be very useful to know what kind of error you have and your server configuration ! Commented Nov 25, 2016 at 16:30
  • @Benoti it is the memory usage error. the wp_posts table is 300+ mib. The issue can be fixed by adding more memory but it doesn't solve the slow backend issue Commented Nov 25, 2016 at 16:32
  • @Matthew : what is the error exactly ? $wpdb ? or mysql ? Commented Nov 25, 2016 at 16:36
  • @benoti could you explain how this helps when I am receiving the memory limit error? Commented Nov 25, 2016 at 16:37

1 Answer 1

2

To increase memory you can do it with wp-config.php.

Administration tasks require much memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT.

define( 'WP_MAX_MEMORY_LIMIT', '512M' );

define('WP_MEMORY_LIMIT', '256M');

note, this has to be put before wp-settings.php inclusion.

With php.ini

memory_limit = 256M ;

With .htaccess

php_value memory_limit 256M

It could be great to upgrade some other values like set_time_limit (that returns error when reached) and max_execution_time

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.