• I’m trying to change the domain name on my multisite wordpress installation. I’ve got it installed on Windows 2008 Server R2.

    When I change the config file. It comes up with the error message that it can’t reach the database. I know I need to change entries in the database, but I don’t know how to do this.

    Does anyone have any suggestions?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey there

    If you want to change the primary domain of your WordPress multisite installation, there are 5 values to change. There is no need to perform a database dump. This is actually frowned upon, as WordPress stores serialized data in the database, and altering it can cause corruption. Here is a list of the 5 main tables and options that need to be changed (note that we’re assuming your table prefix is “wp_”. If you’re using a different table prefix, replace “wp_” in the following table names with your prefix):

    wp_options: options named “siteurl” and “home”
    wp_site
    wp_sitemeta: the option named “siteurl”
    wp_blogs: any entries in the “domains” column that have the old domain name
    wp_#_options: Each sub-site will have sets of tables that correspond to the blog_id in the wp_blogs table. You need to go to the wp_#_options table, where # corresponds to the blog_id, and update the “siteurl” and “home” settings in that table.

    Thread Starter GSATech

    (@gsatech)

    Thanks for the swift response Mike. I’ve had a look at this and I am not sure how to make the changes as you have suggested.

    I installed wordpress using IIS on my windows server. I’m not sure how to access the database.

    Sorry for this, I’m not 100% sure what I am doing as this is the first time I have done anything like this. Using a windows server has added some extra complications.

    I’ve tried installing phpmyadmin on the server, but it came across errors and said I needed to update MySQL to 5.5 instead of 5.1. I’ve got stuck here.

    Thread Starter GSATech

    (@gsatech)

    Brilliant!

    I managed to get it working by finding an older version of phpmyadmin.

    Thanks for your help.

    Now got that that problem of not being able to get to /wp-admin/ on subdirectories. I’ve fixed this before but I can’t remember how.

    Thanks for your help Mike.

    So glad to hear that you got this fixed. If you are having issues with subdirecotries it could be likely that you forgot the trailing slash / at the end of the directory name.

    mydomain.com/site1 should be mydomain.com/site1/

    Hope that helps!

    Thread Starter GSATech

    (@gsatech)

    My subdirectories have now disappeared and I get a 500 error message.

    I am not sure what has gone wrong.

    Mike Price

    (@castroboy)

    Hey

    That sounds like your htaccess is incorrect. Please check your htaccess file via FTP and be sure it has the following:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    Thread Starter GSATech

    (@gsatech)

    Hi Mike

    I am on a Windows server so I don’t have a htaccess file. I do have a web.config file.

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <configuration>
    <system.webServer>
    <rewrite>
    <rules>
    <rule name=”WordPress Rule 1″ stopProcessing=”true”>
    <match url=”^index\.php$” ignoreCase=”false” />
    <action type=”None” />
    </rule>
    <rule name=”WordPress Rule 2″ stopProcessing=”true”>
    <match url=”^([_0-9a-zA-Z-]+/)?wp-admin$” ignoreCase=”false” />
    <action type=”Redirect” url=”{R:1}wp-admin/” redirectType=”Permanent” />
    </rule>
    <rule name=”WordPress Rule 3″ stopProcessing=”true”>
    <match url=”^” ignoreCase=”false” />
    <conditions logicalGrouping=”MatchAny”>
    <add input=”{REQUEST_FILENAME}” matchType=”IsFile” ignoreCase=”false” />
    <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” ignoreCase=”false” />
    </conditions>
    <action type=”None” />
    </rule>
    <rule name=”WordPress Rule 4″ stopProcessing=”true”>
    <match url=”^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)” ignoreCase=”false” />
    <action type=”Rewrite” url=”{R:2}” />
    </rule>
    <rule name=”WordPress Rule 5″ stopProcessing=”true”>
    <match url=”^([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?(.*\.php)$” ignoreCase=”false” />
    <action type=”Rewrite” url=”{R:1}” />
    </rule>
    <rule name=”WordPress Rule 6″ stopProcessing=”true”>
    <match url=”.” ignoreCase=”false” />
    <action type=”Rewrite” url=”index.php” />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing Domain on Root site on Multisite’ is closed to new replies.