by Ron

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.

#config#optimization

Comments

  1. 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?

  2. Ron

    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.

  3. Thanks Ron.

  4. gift ideas

    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

  5. Dnbots

    now thats a good share.. thank you ron.

Leave a Reply

Your email address will not be published / Required fields are marked *