To setup domain mapping from WordPress 3.0, you may follow the steps as below.

  1. Log into your fresh installation of WordPress 3.0.
  2. Add the line as below to your wp-config.php file.
  3. define('WP_ALLOW_MULTISITE', true);
    

  4. You shall be able to found Network from your WordPress tool as image below.
  5. Click on the Network link.
  6. You shall be asked for set the sub-domains or sub-directories sites to your network, select the radio button of sub-domains.
  7. Click on Install button.
  8. WordPress 3.0 shall guide you 3 step where you shall create the blogs.dir folder according to the given path, coding to insert to your wp-config.php file and coding to insert to your .htaccess file.
  9. Once you have done, relogin again.
  10. Next, you shall log into your cPanel and create the wildcard subdomain as detail below.
  11. cPanel => domains => Subdomains =>
    Subdomain: * (asterisk) and select your domain name.
    Document Root: your WordPress path.

  12. Go to the Super Admin panel and select on Sites, add the subdomain.
  13. Then select on Edit from the subdomain.
  14. Change the value of Domain, Siteurl, Home, and Fileupload Url to suit to your new domain.
  15. Edit your wp-config.php file again and change the value as below.

From (assume that you are using domain.com)

define( 'DOMAIN_CURRENT_SITE', 'domain.com' );

To

define( 'DOMAIN_CURRENT_SITE', ". $_SERVER['HTTP_HOST']." );

Author:

WPWebHost.com Administrator.

18 Comments

  1. I do not know with the multi site support in WordPress, will WP Mu continue develop?
    .-= Jennifer R´s last blog ..30 Digital Art Photography Designs for your Design Inspiration =-.

  2. I had to change it to ‘. $_SERVER["HTTP_HOST"].’ to get it to work but it did work.

  3. What’s the deal? You’ve got a silly sidebar that’s sitting on top of your content. For that reason alone I’m not interested at all at finding out what “digg” is, or any of the other choices I can’t read. I’ll find my answer at another site.

  4. I agree. That sidebar made it hard for me to read, had to firebug it out of the screen. You are probably losing an audience over this huge box in the screen.

  5. Hi,
    You are saying “and add the subdomain”. How can I add it in sites, when it only allows me to add as subdirectory. Example: mypersonalblog.ca/test instead of test.mypersonalblog.ca. Could you please give more details on how I can add subdomain.
    Thanks!

  6. your sidebar is killing my eyes
    .-= David´s last blog ..El Mesotelioma y el Asbesto =-.

  7. Thanks for explaining domain mapping with wordpress 3, it really clarified what l needed to do to get control og all future blogs under one admin. regards Pete
    .-= pete´s last blog ..CPA Affiliates – How to Make Money With Affiliate CPA Networks! =-.

  8. Soo WP-MU and WP turned out to be the exact same thing? What a twist!
    .-= Icechen1´s last blog ..Godaddy 099 domains special offer =-.

  9. Hi, If I was going to set up a multi site for several sites do I select sub domain or sub folder if I want each site to have it own domain name? Example: http://www.site1.com http://www.site2.com http://www.site3.com etc.

  10. To any one that tries this be warned! The code given code snippet:

    define( ‘DOMAIN_CURRENT_SITE’, “. $_SERVER['HTTP_HOST'].” );

    did not work for me, nor did the one in the image work for me:

    define( ‘DOMAIN_CURRENT_SITE’, ‘. $_SERVER['HTTP_HOST'].’ );

    I had to use:

    define( ‘DOMAIN_CURRENT_SITE’, $_SERVER['HTTP_HOST'] );

    But it did work eventually :)

    Also, that stupid share bar on the left side of the page blocking everything is super annoying. Although it did get me and my co-workers to drive users to your site to see how bad that banner was.

    Thanks for the good article though :) it helped!

  11. Your social bookmarking sidebar sucks! Can you remove this? It doesn’t let me read article properly.

    • Hi Brett Lee,

      May I know what browser you used when you read our article? Do let us know so we can fix the issue. =)

  12. Am so happy I found this, havent tried yet – I’ve been battling for days now with domain mapping on WP 3.2.1 – I’m hoping by following the examples shown here, something will work for me :) I’ll check back and let you know – :)

  13. Just checking back to let you know that this works for me – finally!!! :D

    I followed your instructions until I got to where I had to edit the wp_config.php file and add the “define Domain Current Site” – I used the line of code as suggested by ‘other pete – 11/10/2010′ and added

    “define( ‘DOMAIN_CURRENT_SITE’, $_SERVER['HTTP_HOST'] );”

    I then added the site in Network Admin – giving it the url its meant to have and added that domain as a parked domain in my primary site’s Cpanel.

    Thank You :)) got you bookmarked now and will be sure to be back soon!

Leave a Comment

Feedback Form
Customer Feedback