Small Optimization

Small Optimization

If you have been running WorPress MU for a while, you may not have seen some of the recent additions to values defined in wp-config.php. For single site WPMU installs, as of 2.6.1, you can save a couple of database and/or internal cache lookups by adding 3 defines to your wp-config.php:

define('DOMAIN_CURRENT_SITE', 'domain.tld' );
define('PATH_CURRENT_SITE', '/' );
define('BLOGID_CURRENT_SITE', '1' );

Substitute your WPMU install's domain and path for domain.tld and /. It is a small optimization, but every little bit helps.

5 Comments
  • drmike
    Posted at 19:34h, 23 February Reply

    Thanks for this, Ron.

    I’m a bit confused as to the term “single site” I’m afraid in this case. I realize that means this can’t be done on sites using the wpmu software to run multiple community domains but does this apply to sites just using the domain mapping solutions like Donncha’s to allow end user’s blogs to have their own domains?

  • Ron
    Posted at 20:22h, 23 February Reply

    That’s right. By sites I’m referring to sites internal to WPMU and not domain mapped blogs. Blogs mapped with Donncha’s domain mapping plugin bypass the lookup which uses the defines I’ve mentioned here.

  • drmike
    Posted at 21:22h, 23 February Reply

    Thanks Ron.

  • gift ideas
    Posted at 05:57h, 28 February Reply

    i’m a bit confused as to the term “single site” I’m afraid in this case. I realize that means this can’t be done on sites using the wpmu software to run multiple community domains

  • Dnbots
    Posted at 08:25h, 02 March Reply

    now thats a good share.. thank you ron.

Post A Comment