-1

wp-admin or dashboard wsod

Website looks fine, only dashboard wsod.

Set WP_DEBUG to true.

No errors displayed.

Then I added no-white-screen.php in mu-plugins as ref. suggested.

These are my errors:

Cannot modify header information - headers already sent by (output started at /home/content/58/11808258/html/FFG/wp-includes/pomo/mo.php:2) Backtrace from warning In /home/content/58/11808258/html/FFG/wp-includes/functions.php [line 1141]:
[line ?] calling process_error() /home/content/58/11808258/html/FFG/wp-includes/functions.php [line 1141] calling header_remove() /home/content/58/11808258/html/FFG/wp-admin/admin.php [line 33] calling nocache_headers() /home/content/58/11808258/html/FFG/wp-admin/index.php [line 10] calling require_once()

There are more similar errors but I won't add these, I don't want to spam.

I haven't added any new plugins or done any theme changes, I've anyways deactivated them (by renaming ftp folders) and the problem persisted.

This is the section of function.php that is reporting the errors:

    function nocache_headers() {
    $headers = wp_get_nocache_headers();
    unset( $headers['Last-Modified'] );
    // In PHP 5.3+, make sure we are not sending a Last-Modified header.
    if ( function_exists( 'header_remove' ) ) {
        @header_remove( 'Last-Modified' );
    } else {
        // In PHP 5.2, send an empty Last-Modified header, but only as a
        // last resort to override a header already sent. #WP23021
        foreach ( headers_list() as $header ) {
            if ( 0 === stripos( $header, 'Last-Modified' ) ) {
                $headers['Last-Modified'] = '';
                break;
            }
        }
    }
    foreach ( $headers as $name => $field_value )
        @header("{$name}: {$field_value}");
}

The 'errors' are produced by these 2 lines

@header("{$name}: {$field_value}"); 

and

@header_remove( 'Last-Modified' );

Any help greatly appreciated!

  • Did you go into the plugins page in WP-Admin after renaming the plugins. This is recommended as it forces the system to deactivate the plugins fully. This is especially true where your site or server is running any sort of memory caching routines eg memcache(d). – Phill Healey May 30 '17 at 11:05
  • I can't get into the wp-admin plugin dashboard due to the WSOD. I have tried individually renaming all the plugins as well as the plugin dir, same goes with themes and theme dir. The WSOD persists with those errors. Thanks for you help :) ! – Jonathan Bingham May 30 '17 at 15:51
  • Disable all at once. Only reenable them once back in wpadmin. If still no luck, download new copy of WordPress and upload files via ftp. – Phill Healey May 30 '17 at 16:00
  • Yeah no dice, ill reinstall. Thanks again! – Jonathan Bingham May 30 '17 at 16:42
  • Just delete the wp files except for wp-config and your theme and plugin then upload the wp core files. No need to reinstall WP. Also how did you disable the theme if no access to wp-admin? – Phill Healey May 30 '17 at 16:48
  • Any update on this? – Phill Healey Jun 08 '17 at 20:20
  • Ya I just reinstalled everything, pretty sure my db was corrupted. Thanks again! – Jonathan Bingham Jun 12 '17 at 15:49
  • WordPress has a built in function to repair corrupt databases. If you'd worked with me I could have got you to that point and likely avoided a reinstallation. Oh well, glad you've got something working at least. – Phill Healey Jun 12 '17 at 19:52

1 Answers1

0

This error suggests that some code is outputing content before the page is complete. This is often brought about by an echo throwing out text or other page components during the wrong part of the WordPress cycle (eg during a background operation / hook).

This is quite a generic error at this stage so you'll need to identify the cause of the issue via a process of elimination. You can start by doing the following:

  1. Rename your plugins folder, so as to ensure all plugins are 100% disabled. Rename wp-content/plugins to 'wp-content/plugins-x' or something similar.

If this restores admin/dashboard access, you can rename the plugin folder and then re-activate plugins one by one until the error returns. At this point, you'll know which plugin is the cause.

If that doesn't get you back into admin you may need to do a similar things with the themes folder.

  1. If that doesn't get you back into admin you may need to do a similar things with the themes folder. If renaming plugins fixes it, then you know it's a plugin causing the issue. Otherwise, it would suggest some bad code in your theme.

If renaming plugins fixes it, then you know it's a plugin causing the issue. Otherwise, it would suggest some bad code in your theme. I'd recommend checking the functions.php file first as this is where most tinkering usually takes place.

In particular, carefully examing any code you might have added or customised.

If you have access to server logs, take a look at these as they should provide more precise info as to the source or at least the point when the issue occurrs.

Phill Healey
  • 3,084
  • 2
  • 33
  • 67