Roadwolf's portal for his random thoughts and ponderings

Moving Wordpress Blog: That Was Easy!

Old Posts

In the process of updating this blog, I have been considering other options to spruce up this website, and also some of the other domains I own. Among those ideas was an option to somehow integrate other domains to become other portions of this website. i.e. my domain could handle all my railroad related articles. But that seems kinda tricky.

One thing I did want to do, is get rid of my /blog/ directory and move the blog straight to the front page. This was a task I was concerned about for a while. I hymned and hawed about it. My main concern was in not loosing my search engine, and external links which bring traffic to the site.

That is easily solved by adding an .htaccess file in the root directory of my domain, which simply says the following:

Redirect 301 /blog

This allows any incoming link request going to /blog to continue to the root domain instead, without losing the rest of the path information. So if you go to now, you will end up at Well that is easy enough. But first we have to move the site.

My option was to just go for it through a FTP editor like FileZilla. I simply copied every file and folder in my /blog directory, and transferred it to my root. Of course then I couldn't access my Admin functions, as I kind of expected. I added the .htaccess file however, and the site began to work for viewing purposes. So it was offline to the public maybe for about a minute.

To get into the admin controls, I had to go in through phpMyAdmin, and edit the SQL Database. I found the database and then looked through wp_options, and edited siteurl as needed.


Upon saving that, I was able to log in again and enter my wp_admin Dashboard, and fix the other URL entry which needed to be updated for full functionality. For some reason I think siteurl in SQL equates to the WordPress URL. The Site Address URL in the WordPress settings page is different and you need to change that too. My Permalinks were already changed when I checked them, and everything seems to be working okay.

All in all, it took longer to write this post, then it did to make this change - which wasn't very long (about 5 minutes).

So there ya have it! Don't be afraid, go for it if this is something you have been thinking of doing on your own site.

Note: I found that comments may not be functioning properly. Please email me if you have a comment and I will post it.

Post a comment

45 views since Feb 2 2024

Next Modern Cars are Glued Together