0

All of a sudden, I got a white page of death on my Wordpress site. I tried all possible troubleshooting I found on Google. Nothing has helped so far.

I tried a fresh install on a new subdomain. Everything works perfect (installation of all plugins, themes etc.) until I connect the new site with my current database (db_orig). When I switch the database to the original one, the subdomain https://test.website.com starts automatically redirecting me to https://website.com. When I switch back to the new database (db_new), everything starts working ok again.

What's interesting is that when I link https://website.com to db_new (which is almost empty - no content inside), it does not work at all. Actually, I can delete the wp-config.php file and nothing changes.

It is quite an unusual behaviour. The database must be corrupted somehow. Is there any way how to search for the last added values to the database, so that I could identify the cause of the problem.

  • I have tried the "Repair table" function
  • no change. I also tried erasing everything in htaccess - no change.

Debug file shows this:

[03-Aug-2018 14:03:34 UTC] PHP Warning: require(/data/web/virtuals/136771/virtual/www/wp-includes/random_compat/random.php): failed to open stream: No such file or directory in /data/web/virtuals/136771/virtual/www/wp-includes/compat.php on line 435 [03-Aug-2018 14:03:34 UTC] PHP Warning: require(/data/web/virtuals/136771/virtual/www/wp-includes/random_compat/random.php): failed to open stream: No such file or directory in /data/web/virtuals/136771/virtual/www/wp-includes/compat.php on line 435 [03-Aug-2018 14:03:34 UTC] PHP Fatal error: require(): Failed opening required '/data/web/virtuals/136771/virtual/www/wp-includes/random_compat/random.php' (include_path='.:/data/web/virtuals/136771/virtual') in /data/web/virtuals/136771/virtual/www/wp-includes/compat.php on line 435

compat.php on line 435 says this:

require ABSPATH . WPINC . '/random_compat/random.php';

random.php is correctly in its place and I have never touched anything in wp-includes folder.

I don't know if it is even related, though.

I have a suspicion that the problem is somewhere with ssl certificate or https redirecting. However, I am not sure about that.

Thank you for help! I am really desperate as I have spent all day working this out.

  • Check in database (db_orig) what value you have in options "siteurl" and "home" in options table. – nmr Aug 3 '18 at 19:28
  • I have done as as well. There's the website correct url – Tomáš Ptáčník Aug 3 '18 at 19:31
0

When transferring wordpress site from one server to another

First step is to udate wp-content foder on old site with new site's wp-content

Then, database ( drop old database, import new database )

finally update wordpress database table with following step.

Login to your phpmyadmin dashboard, choose your database to update and click on sql query runner tab and run following queries one by one

UPDATE wp_options SET option_value = replace(
option_value, 'your old domain address', 'new domain address')
WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(
guid, 'your old domain address', 'new domain address');

UPDATE wp_posts SET post_content = replace(
post_content,'your old domain address', 'new domain address');

UPDATE wp_postmeta SET meta_value = replace(meta_value, 'your old domain address', 'new domain address');

example of old domain address: 'https://olddomain.com'

example of new domain address: 'https://newdomain.com'

remember to update database prefix: wp_

update this value to that of old database in wp-config.php file through ftp

  • Thanks but unfortunately that's probably not the issue. I didn't transfer the web to a new domain. I tried to run all queries with http:// and https:// difference, it updated some records but it did not help. – Tomáš Ptáčník Aug 4 '18 at 6:46
  • If this is php version related make sure to update php. – maverick Aug 6 '18 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.