admin管理员组

文章数量:1416051

I recently just moved servers with a multisite install and kept the same domain.

I can access all the backend features and logins for each subdomain but when trying to visit each subdomain site, it just loads a blank white page.

I have setup wildcard subdomains in cpanel and checked the wp options and wp config.

Has anyone else ever had this issue when migrating servers?

I recently just moved servers with a multisite install and kept the same domain.

I can access all the backend features and logins for each subdomain but when trying to visit each subdomain site, it just loads a blank white page.

I have setup wildcard subdomains in cpanel and checked the wp options and wp config.

Has anyone else ever had this issue when migrating servers?

Share Improve this question asked Aug 7, 2014 at 18:20 user3630457user3630457 1 9
  • White blank pages normally indicate a PHP Fatal error has occurred, but the error isn't being displayed on the frontend. Can you look through your error logs and find the error message? – Tom J Nowell Commented Aug 7, 2014 at 18:48
  • I have not been able to find or setup error logs yet. I just find it strange that only the subdomains on the account are getting the white screen and the entire backend works fine. I don't see anything wrong with the theme files either. – user3630457 Commented Aug 7, 2014 at 19:02
  • Ah without knowing what the error is there's not a lot that can be done to help – Tom J Nowell Commented Aug 7, 2014 at 19:03
  • Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/radiobra/public_html/wp-content/themes/radioresponsive/index.php on line 15 – user3630457 Commented Aug 7, 2014 at 19:34
  • I checked the theme file and it looks fine. – user3630457 Commented Aug 7, 2014 at 19:35
 |  Show 4 more comments

1 Answer 1

Reset to default 0

Your comments state that the line in question that gives the fatal error causing your white pages is this line:

<div id="whatstrending"><h1><?php echo get_option('radio_options')['blog-header'];?></h1></div>

Most notably:

get_option('radio_options')['blog-header'];

Or more specifically:

functioncall()[]

This is invalid PHP up until recently, and your new host doesn't run a version of PHP that supports this.

You can fix it by refactoring it from:

echo get_option('radio_options')['blog-header'];

to:

$options = get_option('radio_options');
echo $options['blog-header'];

Rinse repeat in any other situation that follows the same pattern. As a sidenote, the function()['arrayaccess'] pattern is an anti-pattern, a single line should do a single thing, and calling a function then accessing its return value is 2 things. Not to mention that it will fail if the function doesn't return an array.

本文标签: multisiteWhite pages on sub domains after server transfer