KNOWNHOST WIKI

User Tools

Site Tools


cms:wordpress:how-to-troubleshoot-blank-pages

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cms:wordpress:how-to-troubleshoot-blank-pages [2019/10/10 13:49]
Karson N.
cms:wordpress:how-to-troubleshoot-blank-pages [2020/06/10 13:41] (current)
Karson N. [How to troubleshoot WordPress blank(white) pages.]
Line 4: Line 4:
 This sort of behaviour is not uncommon and can be the result of many things due to the diverse 3rd Party nature of WordPress. When a blank page is experienced the most likely cause is that PHP has experienced an error that has resulted in broken functionality; typically resulting in PHP Fatal Errors. This sort of behaviour is not uncommon and can be the result of many things due to the diverse 3rd Party nature of WordPress. When a blank page is experienced the most likely cause is that PHP has experienced an error that has resulted in broken functionality; typically resulting in PHP Fatal Errors.
 {{howhard>3}} {{howhard>3}}
 +
 In our experience this 'white page' can be can be caused by the following: In our experience this 'white page' can be can be caused by the following:
  
Line 18: Line 19:
 It's usually located in the following paths; It's usually located in the following paths;
  
-<code>cPanel: /home/$user/public_html/error_log</code>+<code> 
 +  cPanel: /home/$user/public_html/error_log 
 +</code>
  
 **__*Where $user is the cPanel account username.__ **__*Where $user is the cPanel account username.__
 ** **
  
-<code>DirectAdmin:  /var/log/httpd/domains/domain.com.error.log</code> +\\ 
 +<code> 
 +  DirectAdmin:  /var/log/httpd/domains/domain.com.error.log 
 +</code>
 **__*Where domain.com is the domain you're checking for.__ **__*Where domain.com is the domain you're checking for.__
 ** **
Line 30: Line 35:
 If no error log exists; we can begin other troubleshooting steps below. If no error log exists; we can begin other troubleshooting steps below.
  
 +\\
 ==== Disabling WordPress plugins ==== ==== Disabling WordPress plugins ====
  
Line 42: Line 48:
 Here's what it looks like in cPanel File Manager Here's what it looks like in cPanel File Manager
  
-{{:cms:wordpress:wp-02.png?nolink&400|}}+{{:cms:wordpress:wp-02.png?nolink&1200|}}
  
 Here's what it looks like in SSH Here's what it looks like in SSH
  
 <code> <code>
-[/home/khtest/public_html/wp-content/plugins]# ll +  [/home/khtest/public_html/wp-content/plugins]# ll 
-total 36 +  total 36 
-drwxr-xr-x  4 khtest khtest 4096 2019-03-12 19:18 akismet +  drwxr-xr-x  4 khtest khtest 4096 2019-03-12 19:18 akismet 
-drwxr-xr-x  9 khtest khtest 4096 2019-04-19 13:34 all-in-one-seo-pack +  drwxr-xr-x  9 khtest khtest 4096 2019-04-19 13:34 all-in-one-seo-pack 
-drwxr-xr-x  7 khtest khtest 4096 2019-04-19 13:33 contact-form-7 +  drwxr-xr-x  7 khtest khtest 4096 2019-04-19 13:33 contact-form-7 
-drwxr-xr-x  4 khtest khtest 4096 2019-04-19 13:34 disable-comments +  drwxr-xr-x  4 khtest khtest 4096 2019-04-19 13:34 disable-comments 
-drwxr-xr-x 11 khtest khtest 4096 2019-04-19 13:33 redirection +  drwxr-xr-x 11 khtest khtest 4096 2019-04-19 13:33 redirection 
-drwxr-xr-x  8 khtest khtest 4096 2019-04-19 13:34 shortcodes-ultimate +  drwxr-xr-x  8 khtest khtest 4096 2019-04-19 13:34 shortcodes-ultimate 
-drwxr-xr-x 12 khtest khtest 4096 2019-04-19 13:33 wordfence +  drwxr-xr-x 12 khtest khtest 4096 2019-04-19 13:33 wordfence 
--rw-r--r--  1 khtest khtest 2281 2018-12-16 21:08 hello.php +  -rw-r--r--  1 khtest khtest 2281 2018-12-16 21:08 hello.php 
--rw-r--r--  1 khtest khtest   28 2014-06-05 10:59 index.php+  -rw-r--r--  1 khtest khtest   28 2014-06-05 10:59 index.php
 </code> </code>
  
 Here's what it looks like in FTP. Here's what it looks like in FTP.
  
-{{:cms:wordpress:wp-03.png?nolink&400|}}+{{:cms:wordpress:wp-03.png?nolink&1200|}}
  
 To disable a plugin; you simply have to rename the plugin. To disable a plugin; you simply have to rename the plugin.
Line 68: Line 74:
 In cPanel you would right click the file > rename In cPanel you would right click the file > rename
  
-{{:cms:wordpress:wp-04.png?nolink&400|}}+{{:cms:wordpress:wp-04.png?nolink&1200|}}
  
 In SSH; you would use the command 'mv plugin-name plugin-name-disabled' In SSH; you would use the command 'mv plugin-name plugin-name-disabled'
Line 76: Line 82:
 Example: Example:
 <code> <code>
-[/home/khtest/public_html/wp-content/plugins]# mv contact-form-7 contact-form-7-disabled +  [/home/khtest/public_html/wp-content/plugins]# mv contact-form-7 contact-form-7-disabled 
-[/home/khtest/public_html/wp-content/plugins]# ll +  [/home/khtest/public_html/wp-content/plugins]# ll 
-total 36 +  total 36 
-drwxr-xr-x  4 khtest khtest 4096 2019-03-12 19:18 akismet +  drwxr-xr-x  4 khtest khtest 4096 2019-03-12 19:18 akismet 
-drwxr-xr-x  9 khtest khtest 4096 2019-04-19 13:34 all-in-one-seo-pack +  drwxr-xr-x  9 khtest khtest 4096 2019-04-19 13:34 all-in-one-seo-pack 
-drwxr-xr-x  7 khtest khtest 4096 2019-04-19 13:33 contact-form-7-disabled +  drwxr-xr-x  7 khtest khtest 4096 2019-04-19 13:33 contact-form-7-disabled 
-drwxr-xr-x  4 khtest khtest 4096 2019-04-19 13:34 disable-comments +  drwxr-xr-x  4 khtest khtest 4096 2019-04-19 13:34 disable-comments 
-drwxr-xr-x 11 khtest khtest 4096 2019-04-19 13:33 redirection +  drwxr-xr-x 11 khtest khtest 4096 2019-04-19 13:33 redirection 
-drwxr-xr-x  8 khtest khtest 4096 2019-04-19 13:34 shortcodes-ultimate +  drwxr-xr-x  8 khtest khtest 4096 2019-04-19 13:34 shortcodes-ultimate 
-drwxr-xr-x 12 khtest khtest 4096 2019-04-19 13:33 wordfence +  drwxr-xr-x 12 khtest khtest 4096 2019-04-19 13:33 wordfence 
--rw-r--r--  1 khtest khtest 2281 2018-12-16 21:08 hello.php +  -rw-r--r--  1 khtest khtest 2281 2018-12-16 21:08 hello.php 
--rw-r--r--  1 khtest khtest   28 2014-06-05 10:59 index.php+  -rw-r--r--  1 khtest khtest   28 2014-06-05 10:59 index.php
 </code> </code>
  
 In FTP; the same process as the File Manager; right click > rename In FTP; the same process as the File Manager; right click > rename
  
-{{:cms:wordpress:wp-05.png?nolink&400|}}+{{:cms:wordpress:wp-05.png?nolink&1200|}}
  
 It doesn't have to be '-disable' that's just what we used for this guide -- you can use '-bak', '.bak', '-old' -- really any variation as the changing the plugin folder disables the plugin. It doesn't have to be '-disable' that's just what we used for this guide -- you can use '-bak', '.bak', '-old' -- really any variation as the changing the plugin folder disables the plugin.
Line 104: Line 110:
  
 <code> <code>
-$ su $user +  $ su $user 
-$ cd public_html +  $ cd public_html 
-$ wp plugin deactivate $plugin +  $ wp plugin deactivate $plugin 
-Plugin '$plugin' deactivated. +  Plugin '$plugin' deactivated. 
-Success: Deactivated 1 of 1 plugins.+  Success: Deactivated 1 of 1 plugins.
 </code> </code>
  
Line 114: Line 120:
 </WRAP> </WRAP>
  
 +\\
 ==== Changing WordPress Theme ==== ==== Changing WordPress Theme ====
  
Line 125: Line 131:
 You're going to want to login to your cPanel account and navigate to PHPMyAdmin You're going to want to login to your cPanel account and navigate to PHPMyAdmin
  
-{{:cms:wordpress:php-1.png?nolink&400|}}+{{:cms:wordpress:php-1.png?nolink&1200|}}
  
 Once inside you're going to see a list of your databases on the left -- in this case; we're using 'khtest_wp' -- we'll then go to the 'wp_options' table. Once inside you're going to see a list of your databases on the left -- in this case; we're using 'khtest_wp' -- we'll then go to the 'wp_options' table.
  
-{{:cms:wordpress:php-2.png?nolink&400|}}+{{:cms:wordpress:php-2.png?nolink&1200|}}
  
 Within this next page you'll see a bunch of data in what is called 'rows' -- rows are numerical and start from 1.  Within this next page you'll see a bunch of data in what is called 'rows' -- rows are numerical and start from 1. 
Line 141: Line 147:
 </WRAP> </WRAP>
  
-{{:cms:wordpress:php-2-1.png?nolink&400|}} +{{:cms:wordpress:php-2-1.png?nolink&1200|}}
  
 We're going to want to modify these two values of 'bhost' (or whatever your theme name is!) to another theme that exists on the server. We're going to want to modify these two values of 'bhost' (or whatever your theme name is!) to another theme that exists on the server.
Line 150: Line 155:
 Method #1 -- double click on the row where 'bhost' is located and it'll turn into an editing box. Method #1 -- double click on the row where 'bhost' is located and it'll turn into an editing box.
  
-{{:cms:wordpress:php-2-2.png?nolink&400|}}+{{:cms:wordpress:php-2-2.png?nolink&1200|}}
  
 You would then change 'bhost' to your a default WordPress theme such as 'twentynineteen' -- or whatever theme you have available. Simply click off to the side or it to save changes You would then change 'bhost' to your a default WordPress theme such as 'twentynineteen' -- or whatever theme you have available. Simply click off to the side or it to save changes
Line 156: Line 161:
 Method #2 -- clicking on the 'edit' button to the left will bring up a larger screen. Method #2 -- clicking on the 'edit' button to the left will bring up a larger screen.
  
-{{:cms:wordpress:php-2-3.png?nolink&400|}}+{{:cms:wordpress:php-2-3.png?nolink&1200|}}
  
 Same as Method #1; you would change 'bhost' to your a default WordPress theme such as 'twentynineteen' -- or whatever theme you have available. Same as Method #1; you would change 'bhost' to your a default WordPress theme such as 'twentynineteen' -- or whatever theme you have available.
Line 163: Line 168:
  
 Now you've updated your WordPress theme so that you can get into 'wp-admin' of your website. Now you've updated your WordPress theme so that you can get into 'wp-admin' of your website.
 +
 +\\
 ==== Utilize site-code to troubleshoot ==== ==== Utilize site-code to troubleshoot ====
  
Line 172: Line 179:
  
 <code> <code>
-function shutdown(){ +  function shutdown(){ 
-  var_dump(error_get_last()); +      var_dump(error_get_last()); 
-}+  }
  
-register_shutdown_function('shutdown');+  register_shutdown_function('shutdown');
 </code> </code>
  
Line 182: Line 189:
  
 Example Example
-<code> array(4) { ["type"]=> int(4) ["message"]=> string(54) "syntax error, unexpected 'register_sidebar' (T_STRING)" ["file"]=> string(62) "/home/khtest/public_html/wp-content/themes/bhost/functions.php" ["line"]=> int(104) } </code>+<code> 
 +  array(4) { ["type"]=> int(4) ["message"]=> string(54) "syntax error, unexpected 'register_sidebar' (T_STRING)" ["file"]=> string(62) "/home/khtest/public_html/wp-content/themes/bhost/functions.php" ["line"]=> int(104) } 
 +</code>
  
 It's recommended that you remove this code as soon as you get the error that you were looking for. It's recommended that you remove this code as soon as you get the error that you were looking for.
  
 We hope that this guide helps how to trouble shoot WordPress's White/Blank page issues. We hope that this guide helps how to trouble shoot WordPress's White/Blank page issues.
cms/wordpress/how-to-troubleshoot-blank-pages.1570733343.txt.gz · Last modified: 2019/10/10 13:49 by Karson N.