Support » Fixing WordPress » Manual upgrade to 3.0.4 failed, problems with wp-content folder

  • Hey folks!

    I just upgraded an installation from 2.8.4 to 3.0.4 and now I am experiencing the white screen of death when I try and view my blog, however no problems viewing the admin screen. All of my plugins are disabled, I’ve reinstalled twice but am still having the issue. Database upgrade was successful… no problem there.

    I’ll refer to my site as mydomain.com while on here since the site I am talking about is not accessible publicly. Private small company stuff 🙂

    My setup is slightly more complicated than a normal site. I have three different wordpress installations loaded on a single hosting account. They are each buried in sub directories on three different subdomains.

    example:
    site1.mydomain.com/(blog1)
    site2.mydomain.com/subdir1/(blog2)
    site2.mydomain.com/subdir2/(blog3)

    I’ve adjusted each installation (from within its wp-config.php file) so that they all use the same wp-content folder, which I placed in the root directory. (www.mydomain.com/wp-content)

    I did this so that I could make each wordpress installation use the same theme, plugins, and keep all the uploads in the same place… it has been working brilliantly until the upgrade.

    Out of the three upgrades I am performing, one of them was a success, and is reading the redefined wp-content directory.

    The other two are ignoring the code in wp-config.php, and are looking for the wp-content folder to be in the default location…despite the redefined wp-content code. I know this is the case because if I upload a wp-content folder into the default location for one of these installations, the 2010 theme loads without issue and I am able to see my posts again (with no media of course). If I remove the default wp-config folder, I get the white screen.

    I’m using the following code in wp-config to specify the location of the wp-content folder:

    define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content’ );
    define( ‘WP_CONTENT_URL’, ‘http://www.mydomain.com/wp-content’);

    From within the admin >> theme selection screen, if I have the default wp-content folder renamed or removed, I get several error messages:

    Warning: array_keys() expects parameter 1 to be array, boolean given in /home/myaccount/public_html/site2/subdir1/wp-includes/theme.php on line 513

    Warning: uksort() expects parameter 1 to be array, boolean given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 73

    Warning: array_slice() expects parameter 1 to be array, boolean given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 94

    I have no idea why one installation works, and why the others don’t… it’s the exact same files except for the unique settings in each wp-config.php file. The only thing I can think of is that I the one that works may have been upgraded to 2.9 or another version before moving to 3.0.4, and the rest are just upgrading from 2.8.4.

    Has anyone else had this problem? Is there another way for me to redefine the location of wp-content?

    Thanks!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Check file permissions for ../wp-content, ../wp-content/themes as well as ../wp-content/plugins directory.

    Thread Starter carmolio

    (@carmolio)

    Thanks for the reply… File permissions are all good. It’s working fine for one of the installations… it’s just the other ones that are ignoring the redefine and attempting to load wp-content from the default location.

    It was a long time since I was using 2.8.4 and many thing changed from that time to newest 3.0.4. Just wondering would something like this be acceptable for you? I have few of my own set this way and they work like charm. And also go over a network as well.

    If this doesn’t work, I am sure that one of the moderators will know how to get around this. Will also try to get one of the WP Dev guys, if he has time 🙂

    This is odd. I see no reason why this would fail due to a core issue. Let’s see if we can diagnose.

    The symptoms suggest it probably has to do with changes in 2.9, relating to theme root registrations. So let’s walk through that code.

    The errors you’re seeing are very helpful. They tell me that get_themes() is returning false. This is caused by search_theme_directories() returning false. That in turn is caused by opendir($theme_root) failing.

    If you open up wp-includes/theme.php, line 584, you’ll see an @ sign in front of the opendir() call. If you remove that, you should trigger an E_WARNING that should explain why that is failing.

    Thanks Andrew 🙂

    Thread Starter carmolio

    (@carmolio)

    That does look like a cool feature… unfortunately I have many other things loading at the pub_html/root level of the website, and from what I understand WordPress needs to be installed there in order to use the multi-site functionality. The blogging part of our website is secondary so it’s getting buried on random sub domains or in sub directories.

    Again, Thank you for your suggestions… this is a strange issue 🙂

    Thread Starter carmolio

    (@carmolio)

    Hi Andrew, thanks for your help…
    I removed the @.. where would I see output for the E_WARNING?

    I went back to wp-admin/themes.php and I am getting the same error messages. There were additional error codes before, which I did not post. Here they are in case it makes a difference:

    All of this theme’s files are located in .
    Available Themes

    Warning: array_keys() expects parameter 1 to be array, null given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 150

    Warning: natcasesort() expects parameter 1 to be array, null given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 151

    Thread Starter carmolio

    (@carmolio)

    This is what my server error log displays… pretty much the same thing:

    [Sat Jan 08 04:45:59 2011] [error] PHP Warning: natcasesort() expects parameter 1 to be array, null given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 151, referer: http://site2.mydomain.com/subdir1/wp-admin/
    [Sat Jan 08 04:45:59 2011] [error] PHP Warning: array_keys() expects parameter 1 to be array, null given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 150, referer: http://site2.mydomain.com/subdir1/wp-admin/
    [Sat Jan 08 04:45:59 2011] [error] PHP Warning: array_slice() expects parameter 1 to be array, boolean given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 94, referer: http://site2.mydomain.com/subdir1/wp-admin/
    [Sat Jan 08 04:45:59 2011] [error] PHP Warning: uksort() expects parameter 1 to be array, boolean given in /home/myaccount/public_html/site2/subdir1/wp-admin/themes.php on line 73, referer: http://site2.mydomain.com/subdir1/wp-admin/
    [Sat Jan 08 04:45:59 2011] [error] PHP Warning: array_keys() expects parameter 1 to be array, boolean given in /home/myaccount/public_html/site2/subdir1/wp-includes/theme.php on line 513, referer: http://site2.mydomain.com/subdir1/wp-admin/

    Andrew will know this better, however my (wild) guess is the theme compatibility. I would switch to default theme to see if this is it and try the normal theme you were using after that. That would be the issue I think.

    2.8.4 to 3.0.4 was big step 🙂

    Thread Starter carmolio

    (@carmolio)

    I just found another error on wp-admin/update-core.php

    Warning: Invalid argument supplied for foreach() in /home/myaccount/public_html/site2/subdir/wp-admin/includes/update.php on line 222

    Thread Starter carmolio

    (@carmolio)

    worth a shot….

    I just uploaded the twentyten theme into my main wp-content folder at public_html/wp-content/

    The wp-admin/themes.php file from the wordpress installation is unable to even scan that directory to see what themes are available… same errors.

    The theme I had before is working with the 3.0.4 with the redefined wp-content folder on the first installation: site1.mydomain.com

    *Both themes can load for the second installation as long as I put them into the default spot: site2.mydomain.com/subdir1/wp-content/themes

    It just doesn’t work when I try and move the wp-content folder 🙁

    *update: actually… now its totally busted. going to try and do a complete reinstall just with defaults to see if i can get it to run.

    Thread Starter carmolio

    (@carmolio)

    I did a manual re-install. Both the twentyten and my other theme are loading fine as long as wp-content is in the default location.

    I am back to my same errors again if I try and redefine the location of the wp-content directory 🙁

    How about something like this?

    define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
    define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');
    define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
    define( 'WP_PLUGIN_URL', 'http://example/blog/wp-content/plugins');

    Thread Starter carmolio

    (@carmolio)

    Still the same problem 🙁

    Oh man, I really don’t know what else, Very weird issue I can tell you that much.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Manual upgrade to 3.0.4 failed, problems with wp-content folder’ is closed to new replies.