Moving your WordPress from a subfolder to the root directory

I finally decided to change the path of my blog from to just Originally I anticipating having a whole suite of cool things on my site for people to access, but in reality in 12 years of blogging I never did.

So I decided to make my blog look a little more professional, and took out the folder names. I thought it would be a HUGE task, but actually it was easy. Here’s what I did:

Step 1: I logged into my WordPress admin, went to Settings->General and changed my “WordPress Address” and “Site Address”.

Step 2: I logged into my cPanel account and went to the File Manager. Once I opened up /blog/ I selected all the files (shift click the top, then while holding shift click the last file) and clicked  the Copy button.

Step 3: I went to the main root folder and clicked the Paste button. I was shocked because the files all zipped away for me in less than a minute to boot!

Step 4: I used phpMyAdmin to goto my blog’s database, and inside wp_options I searched for /blog/ and changed a few. I wouldn’t go moving *everything* (I did that first, and it broke the blog lol) but there were a few plugins that had the old path saved in wp_options.

Step 5: I removed all the files in /blog/ and created an .htaccess file with the following code:

RewriteEngine On
RewriteRule ^(.*)$ /$1 [R=301,L]

That’s it! Now everything is moved over for me and I’m loving it!

One thought on “Moving your WordPress from a subfolder to the root directory

Leave a Reply