domain mapping not saving mapped domain

I set up domain mapping and followed the instructions, it was working last night but not any more.

when i log in with a test site and type in a domain in the domain mapping settings and then add the domain just clears, nothing gets added and when i look in my admin section i dont see the client site being mapped either.

i double checked config.php and surprise on is there i also moved the surprise file to wp-content and domain mapping.php to mu plugins.

i have supporter installed but domain mapping can be done by non supporters.

  • Philip John
    • DEV MAN’s Apprentice


    Just checking if it was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that’s great news.

    If not, could you let us know by re-opening this topic, and we’ll get onto it and helping you out asap!

    Otherwise, happy days, glad you got it sorted :slight_smile:



  • James Hu
    • Design Lord, Child of Thor

    I have meet same problem today. Here is my way to solve it.

    Following Barry’s reference, I found the wp_domain_mapping table in mysql lost.

    I have another wordpress using domain mapping. So, I used phpmyadmin to export the table into a file,

    and import it into the error blog’s database.

    Also I adjust a little things in mysql to mach the blog’s number.

    The plugin run good now. Hope this could be useful to others. :slight_smile:

  • internet-office
    • New Recruit

    I have problem with this Domain mapping too.

    Whatever i do – i receive this –


    If you feel you have reached this page in error, please contact the web site owner:

    It may be possible to restore access to this site by following these instructions for clearing your dns cache.


    It has DNS record and right IP. I dont know what could be the problem.

  • Phil
    • WPMU DEV Initiate

    I have a similar problem. Followed all the instructions and the mapped domain ( ) just points to the main site ( ), which is then weirdly stripped of all css, instead of the intended subdirectory ( ).

    Using most current version of WordPress with a subdirectory multisite install. Hosted on VPS. I tried rebooting the server, clearing browser cache, etc.

    The domain mapping table is present in the database, but uses a different prefix (wp_jy5n57_domain_mapping)

  • SJoAnneF
    • Site Builder, Child of Zeus

    So – the issue of the domain mapping not saving actually went away by itself. A little frightening. I did try to add a mapping immediately upon adding the plugin, which resulted in the issue of the row not being saved. But when I tried again hours later, it worked!

    Now my row is saved, but it still doesn’t appear to work correctly. I set up the domain mapping to point: to (my multisite).

    I added the cname for dogs2 to point to, and I can see it’s taken effect based on the below. However, when I hit, I just end up at a cpanel screen.


    ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5_7.1 <<>>

    ;; global options: printcmd

    ;; Got answer:

    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31130

    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0


    ; IN A

    ;; ANSWER SECTION: 3600 IN CNAME 14400 IN A

    ;; AUTHORITY SECTION: 86400 IN NS 86400 IN NS

    ;; Query time: 1 msec

    ;; SERVER:

    ;; WHEN: Fri Nov 18 06:31:54 2011

    ;; MSG SIZE rcvd: 145

  • Philip John
    • DEV MAN’s Apprentice

    Folks, can I ask that you start separate threads please? We can’t really deal with multiple people in one thread – it just gets too confusing for everyone.

    If you start new threads we can deal with each of you individually and with more attention.


  • chamomor
    • WPMU DEV Initiate


    I had the same problem because I’ve forgotten something. This is simple, relax and breathe :wink:. This how I fixed it :

    – unzip folder of the plugin inside mu-plugins directory (you’ll have a repertory domain-mapping and files)

    – move the file sunrise.php to wp-content

    – move the file domain-mapping.php in root of mu-plugins

    – In database:

    if you could not find wp table wp_domain_mapping, you should recreate it.

    Just paste this on SQL Request in your database :

    CREATE TABLE IF NOT EXISTS<code>wp_domain_mapping</code> (
    <code>id</code> bigint(20) NOT NULL AUTO_INCREMENT,
    <code>blog_id</code> bigint(20) NOT NULL,
    <code>domain</code> varchar(255) NOT NULL,
    <code>active</code> tinyint(4) DEFAULT '1',
    PRIMARY KEY (<code>id</code>),
    KEY <code>blog_id</code> (<code>blog_id</code>,<code>domain</code>,<code>active</code>)

    – wp-config : then, open your wp-config.php, and check if you have not forgotten this line:

    define( 'SUNRISE', 'on' );

    that’s all

    see ya

  • Jeff Hoffman
    • WPMU DEV Initiate

    For anyone having this issue, here is the key point I was missing:

    To create the domain_map (or domain_mapping) table, you have to add a domain AS SUPERUSER.

    After the table is created, anyone can add a domain. But the first domain MUST be added by admin.

  • Jeff Hoffman
    • WPMU DEV Initiate

    On multisite, I installed the plugin as network admin, activated it, and logged out.

    I logged in as a premium member (I’m using Pro Sites), tried adding a mapped domain and it wouldn’t save. The table was not created, either.

    I logged out, logged back in as network admin, went to the dashboard of the premium member’s blog, added the mapped domain, and it saved. The table was created.

    It wasn’t intuitive to have to use network admin (is_super_admin()) via the dashboard of a member blog to create the table. It’s my users who will be mapping their domains, not me.

    IMO, the table should be created when the plugin is activated, not when the first domain is mapped.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.