Changing JUST the Domain Name
-
Brief synopsis. We have a legacy site… https://www.bemidji.k12.mn.us and are in the process of building a new site in WordPress (Multi-user with directories, not subdomains… ie, Central elementary is https://wptemp.bemidji.k12.mn.us/central/). We are building the site in the root of www in the WordPress directory. The URL to this install is https://wptemp.bemidji.k12.mn.us and the site was obviously based upon that URL.
So now that we have things built, we want to simply change the domain of the WordPress install to https://www.bemidji.k12.mn.us. My intention is to simply change the directory of the virtual host “www” to look in the “wordpress” directory (so I won’t be moving anything) and then make the appropriate changes to the WordPress config files to effect the entire change.
So we are not moving any files… simply changing the site(s) from “wptemp” to “www”.
I was making changes according to the codex instructions, but ended up with some odd problems… Unable to connect to database errors, problems with the URLs not appearing as “www”, etc.
I’ve restored the database back to the starting point and am going to try to run through it again. This seems like it should be a pretty straightforward change, but I’m guessing my problem is that there are changes in the database that I am missing.
I changed wp-config to reflect the new domain name.
In the database I changed “wptemp.bemidji.k12.mn.us” references to “www.bemidji.k12.mn.us” in the following tables/columns:wp_options: site_url, home
wp_blogs: domain for the site
wp_site: domain
wp_sitemeta: siteurl.htaccess (in the wordpress directory) looks like this:
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]Where else should I be making changes/what have I left out here?
- The topic ‘Changing JUST the Domain Name’ is closed to new replies.