WordPress.org

Forums

Upgrading or Installing YD Network-wide Options (19 posts)

  1. ant01
    Member
    Posted 4 years ago #

    I recently moved my site to a new host and I been having problems with the multi site ever since. I originally installed YD Network-wide Options plugin and had a message to upgrade the plugin. When I upgraded I got the following error

    Fatal error: Call to undefined function switch_to_blog() in /home/timeoutb/public_html/wp-content/plugins/yd-wpmu-sitewide-options/yd-wpmu-sitewide-options.php on line 715

    I couldn't do anything on the site and had to delete the plugin via ftp. I tried installing from scratch but still get the same error.

    Can some please advise if this is the correct plugin for Multi site development and what the problem could be?

  2. Does the site work without the plugin?

    You may need to clean out the database settings and start over with it (I've had certain plugins get hinky after a move). Basically though, if it works when you delete the plugin, then it's a plugin problem, and you may need to wait till the dev gets alerted.

    I've tagged this yd-wpmu-sitewide-options so he should be notified.

  3. ant01
    Member
    Posted 4 years ago #

    The site works ok without the plugin, I followed the instructions from the blog Remove WordPress Multisite data and I then tried to reinstall but I got the same error.

    I'm not 100% sure what u mean clean out the database settings, I deleted the following files from the database;
    wp_blogs
    wp_blog_versions
    wp_registration_log
    wp_site
    wp_sitemeta
    wp_signups

    I also check the wp-config.php file and can't see any reference to a multi-site setup

  4. I also check the wp-config.php file and can't see any reference to a multi-site setup

    So ... you didn't add define('WP_ALLOW_MULTISITE', true); to your wp-config.php file?

    Those are TABLES in the database, not files, by the way. And if the database settings are per-site, so in wp_options (or wp_1_options) there may be references to the plugin. Then again, if you wiped the whole thing then it's not that.

  5. ant01
    Member
    Posted 4 years ago #

    I'm not to sure but I think I sorted the problem out. I copied the references from my old site wp-config to the new config.
    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'timeoutbookings.co.za' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    I then imported the backup of the tables I had deleted earlier.
    In my plugins I had a plugin which was network activated which I deactivated.

    This seems to have worked and its up and running now, i'll check to see if everything else is ok.

    Thanks for the help.

    Can ask u also a quick question about referencing a domain name to a sub-domain in a wordpress multi-site, is this possible so that when you type a domain name you are taken to a sub-domain ?

  6. Yes, but that's just domain parking, and not a MultiSite thing (unless what you want is for domain.com to transparently become subdomain.domain2.com )

  7. ant01
    Member
    Posted 4 years ago #

    I want the domain to transparently become subdomain.domain2.com If I park the domain on the hosting site can I set the domain as the subdomain in the wordpress multi site.

    The only other way I can think is of is to redirect it via the index.php but that will still have the subdomain as the URL

  8. Can ask u also a quick question about referencing a domain name to a sub-domain in a wordpress multi-site, is this possible so that when you type a domain name you are taken to a sub-domain ?

    maybe you;re looking for domain mapping:

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/
    http://ottopress.com/2010/wordpress-3-0-multisite-domain-mapping-tutorial/

  9. ant01
    Member
    Posted 4 years ago #

    I thought it was to good to be true.....

    When I add a new site I get error when I try accessing the backend or viewing the site, says google can't find address.

    Any ideas?

  10. BEFORE you mess around with domain mapping, make sure it works in general :) Always always.

    If Google can't find the address, then your domain name is probably wrong.

  11. Before you mess with anything network specific, always make sure the subsites work. ;)

  12. ant01
    Member
    Posted 4 years ago #

    the domain and site works http://www.timeoutbookings.co.za but the subdomain doesn't work http://new.timeoutbookings.co.za/

  13. Did you set up wildcard subdomains as per the network enabling instructions? Did you ask your webhost if they are supported?

  14. ydubois
    Member
    Posted 4 years ago #

    Hi,
    I'm arriving after the battle here, but anyway, just for the records, since a plugin of mine was mentioned:

    The message "Fatal error: Call to undefined function switch_to_blog()" always means you are trying to use networked site-specific features in a non-networked WordPress setup (switch_to_blog() is a WPMU core function: hence if it's not defined it automatically implies you're not networked).

    It is not specific to this plugin (although in a future version I might as well have the plugin check if the site is really multisite-enabled upon install!)

    And just to make it very clear, the YD Network Wide Options plugin, as the name implies, has no use whatsoever in a non-networked setup.

    @Ipstenu: thanks for the tag, and for pointing in the right direction (site wasn't even multisite enabled in the first place) - this seems a pretty current mistake.

  15. @ydubois - You may want to consider a check on activation. "Is MultiSite enabled? No? DIE!"

  16. ydubois
    Member
    Posted 4 years ago #

    @Ipstenu: yeah that's what I said. I'll do it on next release, but that won't be soon: I just released a new stable version, I have to work on other stuff before. Anyways here the user switched their site from multisite to standalone without first deactivating plugins, if I understand well. So that means this would have to be checked everytime, not just on first activation. Guess in that case I definitely should switch to more paranoid programming ;-)

  17. ant01
    Member
    Posted 4 years ago #

    Sorry, I am very confused. I managed to set it up perfectly on the previous host but somehow I missed the plot this time.

    I looked at the installation instructions but not sure on the following;
    1. How do I set up the wildcard subdomains
    2. Where do I check on activation. "Is MultiSite enabled. In the Dashboard it gives me the option as Super Admin and I can create the subdomain but they don't work

    Apologies but I think I need a idiots guide....

  18. 1. How do I set up the wildcard subdomains

    This comes down to your host. Ask them first.

  19. ant01
    Member
    Posted 4 years ago #

    Thanks for all the help, I think the problem was setting up a wildcard for my sub domains. I figured out how to do this by adding a *.domain.com to the subdomains via the cpanel in the hosting account. :)

    So far so good, now I need to work may way through the plugin and the various settings, would be nice to have a tutorial.

Topic Closed

This topic has been closed to new replies.

About this Topic