Before last two days, One strange issue happened with me that is I was working on one word-press site and I have installed one plugin, I got blank screen for some pages and I have thought that plugin is causing the issue and because of the plugin whole site stop working.I thought the bad plugin that was affecting my whole site and first of all, I have fully removed that plugin from a site and still my site was getting a blank screen.
So I was frustrated and concerned my team members for same and by their suggestions, I have turned off all plugins,switched from my theme to default theme, have removed htpassword/htaccess file,changed permalinks, update database from backup, I have tried lot of possibilities, but all steps failed to resolve the issue. To do all those things I have spared my lot of time so I was in tension also.
Finally, I was started searching for issue in Google and got the solution for that issue and solution was totally surprising me so now I want to share about WP blank page problems with you. Maybe this helps someone.
I was checking all files by applying die; one by one in all files and I have checked my wp-config file for same and I got that my wp-config file was creating a problem so let’s see my wp-config file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | define('DB_HOST', 'localhost');/** MySQL hostname */ define('DB_CHARSET', 'utf8');/** Database Charset to use in creating database tables. */ define('DB_COLLATE', '');/** The Database Collate type. Don't change this if in doubt. */ /**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. * * @since 2.6.0 */ define('AUTH_KEY', 'YQ#AQ1b_5WvJW-M_J!aQ'); define('SECURE_AUTH_KEY', '-Ax#s=wTaAJ_Y/AFdLF7'); define('LOGGED_IN_KEY', 'RG9XW-a$(UQXXB%Y#/k5'); define('NONCE_KEY', 'H=7ZhTGU#&O4C$p!ZCp#'); define('AUTH_SALT', '4sbGYuJZ0/_dZVj6J=QE'); define('SECURE_AUTH_SALT', 'ya64VA- zav/DOQT04Tk'); define('LOGGED_IN_SALT', 'ZB1PfZrEv@-YdI8&BWj5'); define('NONCE_SALT', 'L_khBWd8xB $r3=O)TyQ'); define('WPLANG', ''); /* That's all, stop editing! Happy blogging. */ /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ //space //space |
You should also read:
WordPress Multisite Explained
To migrate WordPress from subdomain to subdirectory
WordPress site into maintenance mode Without Plugin
To maintain session in WordPress
And I found there are extra blank lines after the closing PHP tag “?>” and that was caused the whole things.So Be sure If there is an extra space after the actual end of the wp-config file, delete that space.
Amazing! I removed that spaces and everything worked fine and the site seems as it is.
Comments (7)