Search code examples
wordpresswordpress-themingwp-admin

how can I fix white screen in wordpress theme?


I downloaded a theme and activated it. it worked normally, until i changed the theme.

My site opens normally in wp-admin but it gives white screen in public navigators.


Solution

  • The well known "white screen of death". Not to worry, the issue is most likely easy to fix.

    Here is what you can try, if you have access to your FTP go to the /wp-content/plugins/ folder and temporarily re-name the /plugins/ folder to something else such as /plugins-temp/

    This will disable all of your plugins which will most likely allow you to gain access to your WP dashboard again.

    You may also do the same for the /themes/ folder located in /wp-content/themes/

    Once you have access to your WP dashboard again re-name back those folders as they were before. Then you can try activating your theme again while all plugins are deactivated. If it fails again you can enable the debug mode to see which errors appear. To do that open the file wp-config.php and add this code to it:

    define( 'WP_DEBUG', true );
    

    Now once you activate the theme and see a white screen it should also show an error. That error will tell you what is happening. Most often than not an error that says allocated memory shows up. This will tell you to increase the PHP memory on the server, to do that contact your hosting provider or increase it manually through your cPanel.

    If you do not have access to your FTP and are unfamiliar with that, contact your hosting provider and tell them about that error. Most hosting providers will be able to fix that for you.