phpwordpresswp-admin

undefined function wp_raise_memory_limit() in wordpress


Hi I have an Error from wp-admin in wordpress 4.5.15 wp-admin show me a blank page . in debug mode show me this Error :

Fatal error: Uncaught Error: Call to undefined function wp_raise_memory_limit() in /home/me/domains/me.ir/public_html/wp-admin/admin.php:156 Stack trace: #0 /home/me/domains/me.ir/public_html/wp-admin/index.php(10): require_once() #1 {main} thrown in /home/me/domains/me.ir/public_html/wp-admin/admin.php on line 156

and in this line (156) have this code :

if ( current_user_can( 'manage_options' ) ) {
    wp_raise_memory_limit( 'admin' );
}

what can i do now ? please help me my php version is 5.6.40


Solution

  • I think you first need to verify whether a plugin or theme is causing the problem.

    Temporarily rename the wp-content/plugins folder to something else, then access the admin panel. If the problem does not reoccur, recreate the wp-content/plugins folder, then move plugins' folders in there in small groups to determine a suspect. You may need to activate those plugins.

    If you can get to the admin page with plugins disabled, do a WP core update via the Updates page. Then start eliminating plugins.

    If the problem is still there with wp-content/plugins folder renamed, rename non-default themes (in wp-content/themes) folders (the ones that aren't 'twenty-something'). That will cause your theme to default to the WP-supplied one. Get into the admin page and do a WP core update.

    Then restore themes and activate them as needed until you find the culprit.

    I suspect a plugin before a theme. And know that this will cause your site to be a bit 'goofy' because plugins are disabled. But that is what I would do.