I first launched this blog with the url southernitalianandsuch.com. After about ten to fifteen posts, I decided that I wanted to change my blog’s name. Doh!! Was all that work wasted? Nope, it was actually a fairly simple process to change the blog over to a new domain, so long as you are keeping the blog on the same server. I currently use a Mediatemple DV Virtual Private Server. I run a few different websites on this server, and I like to tinker a bit, so a virtual private server offers that ability to tinker as well as scale server performance if necessary.
To learn more about Mediatemple or other hosting services I have used, check out my blog post on how to start your new food blog.
I decided to change the name of my blog from southernitalianandsuch.com to dadspantry.com. Amazingly, the url was available and it was not in use on any social networking sites. So I snapped it up. I decided to do this to hopefully create a broader appeal for my blog, and quite frankly, there was nothing so uniquely southern about my blog that warranted that initial name anyway. But I am a dad to two kids, and I loved to cook and go through my pantry thinking of new ideas. So dadspantry.com it is!!
Luckily the move didn’t require anything too crazy in terms of server work, nor any direct database work. I just needed to go through the following steps.
How To Change A Food Blog’s URL: 7 Steps
Warning, if you don’t understand how to successfully complete any of the steps listed here, particularly steps 3 and 4, you should stop what you are doing either until you learn how to do all of these steps or you have help from somebody who can do them for you. You can cause irreversible damage to your blog if you fail to successfully complete all steps listed, particularly steps 3 and 4.
Step 1: Find a new internet domain name for your blog
First, purchase the new domain name using your hosting providers domain purchase service. Be careful when purchasing your domain name. You obviously need to pick something that your domain provider says is available. But you also will want to go look on social media to see if anybody is already using your proposed name. It would even be wise to do a quick trademark search on the USPTO’s website before pulling the trigger on the domain name purchase.
Step 2: Change the WordPress Home and Site URLs For Your Blog
In your WordPress admin panel, click on Settings and then General. Change the variable WordPress Address (URL) and Site Address (URL) to the new domain name. You have to do this eventually, it is just easier to do it now before the transfer. So do it now.
Step 3: Back Up Your Blog’s Files
Using FTP software, connect to your server and download your WordPress site’s files to your local computer. This will be your local file back up in case anything goes wrong. You will re-upload these files to the new location on your server once you know where to upload them to. Depending on your WordPress install, this will take a few minutes at least, and if you have lots of media on your site, much longer than that.
Step 4: Back Up Your Blog’s Database
Create a backup file for your blog’s database. You actually do not have to recreate your database to change your blog’s url and stay on the same server, the new blog install on the same server can continue to use the current database. You are making this database backup just in case something goes wrong. You perform this backup by exporting what’s called an .sql file from your server to your local computer. If something happens to your database, you can reimport this .sql file to your server and recreate your blog’s database. You can figure out which database your WordPress blog is using by opening the wp-config.php file in your blog’s root directory. In that file you will see a line that looks like this:
define( ‘DB_NAME’, ‘MyDatabaseName’ );
Your particular database name will be on that line instead of ‘MyDatabaseName’. That will be the database you export.
Step 5: Configure Your New Domain Name
Using your server’s management software, add your new domain name and point your new domain at a new web-accessible directory on your server. This is how your server knows where to route web requests for your new domain name.
Step 6: Reinstall Your Blog’s Files
Using FTP, upload the old WordPress files on your local computer to the new web directory.
Step 7: Modify Your Database To Work With Your New Domain Name
Install the WordPress plugin Better Search Replace. Run a search and replace on your blog’s database using the WordPress plugin Better Search Replace to replace your old domain name with the new domain name everywhere it appears in your database. You have to do this because in multiple places in your database your domain name is stored. Your new site will not work correctly with the new domain name, until you remove the old references to your domain name and replace them with the new domain name. Your best bet is to use a WordPress plugin to do this, and I recommend Better Search Replace.
At this point, your new blog url should be up and running. Congratulations! Now hopefully you can get back to creating content, and not worry about these server issues anymore!
Leave a Reply