You are here: WordPress Video TutorialWordpress TutorialMove wordpress to subfolder or subdirectory

Move wordpress to subfolder or subdirectory

by Kimi on March 31, 2010

Hey guys, I wanted to install wordpress in my main domain which is web6.org. And when i tried it, i notice that having all wordpress files in a subfolder or subdirectory is more clean and organized.


Before doing this, always remember to make backup and copy of your files. How to back up?, you might check my other video which called backup database in wordpress. blog seo

It’s always a good choice to be religious on backing up because we work with database which is more complicated than working with html files.

So i did install in the root, and wanted to move the files to subfolder. I have tried it and it worked.

Here is the screencast.

Subscribe new tips via Email:

Was the post helpful? Share it to help others with:

{ 20 comments… read them below or add one }

Cierra Parrino March 31, 2010 at 10:35 am

This is my first time to visit your blog and I would say you share nice information. You definitely do research and write very well. Keep it up!

Reply

Dina March 31, 2010 at 11:41 am

Hey Cierra Parrino, Thanks for your nice comment, stay in touch :)

Reply

cah ndeso April 1, 2010 at 4:16 am

The information provided is very good. So with transferring files to a specified directory, file management is expected to be easier and not messy.

Reply

Dina April 1, 2010 at 8:24 am

Selamat Pagi! :D Thanks for commenting:) yes, I had my file manager messy lol. Especially wp has many files and folder. See you.

Reply

darahbiroe April 4, 2010 at 1:07 pm

makasih yaw videonya
sangat bermanfaat sekali
gpp kan saya comeng pake bhs indonesia hehehhe

Reply

Dina April 4, 2010 at 5:06 pm

Hai darahbiroe,

sama-sama, tentu saja boleh pake bahasa Indonesia lah :D

Reply

David D. May 28, 2010 at 9:30 pm

Thank you Dina! Your video helped me understand how to have my blog at root but keep wpress files in a subdirectory.

Reply

Dina May 29, 2010 at 8:19 am

Hi David D,
You are very welcome, i am so glad that it helps :D

Reply

Claudio August 17, 2010 at 10:37 pm

Hi, thanks for your video! I have the necessity to create subsites for the various languages.
For example http://www.securusvault.ca/fr/
I moved all files and modified the wp_options entry in the DB, but I still have problems with the inner pages. They show a 404 error.
Can you please show us how you can move a WP instance to a subdirectory and also change the permalinks to show the subdirectory in the URL?
Thanks!

Reply

Dina August 18, 2010 at 5:43 am

@Claudio, Hi there

I have checked your site and didn’t see any 404 errors?

When you changed the directory, usually you won’t change anything in the permalinks settings.

Also, i would use plugins for the different site language, with qtranslator plugin.

Reply

Claudio August 18, 2010 at 9:13 am

@Dina,
Hi Dina, thank you for the prompt answer, actually for some reason the site started working after having edited one page. Now I’m having the same problem with www1.securusvault.ch/de.
It seems that if I edit or create a new page the site starts working but it’s not really deterministic as I did so with the ch/fr and ch/de sites and they’re still having the problem. The weird thing is that the 404 error page is from the site located in the root folder, so it looks like the /fr or /de subfolders are not recognized as root folders of a WP install.
thanks again!
Claudio

Reply

Dina August 20, 2010 at 12:17 pm

@Claudio, hi there,

I noticed you have a new installation of wordpress, i would re-install in the directory you wanted it because if its new you still can start from the beginning.

But if you want to keep it this way, i recommend you ask in wordpress.org support, it has never happened to me, so i am not sure about it.

I guess it is because of your .htaccess file.

Have you tried deactivating all plugins and see if it works? sometimes it can be caused by redirections plugins.

Sorry a little late to reply, i am busy with the kids in summer holiday :D

Victor January 12, 2011 at 11:02 am

Hi Dina, I want to move my wordpress files to a subfolder with index.php too, because I want to have static pages in the root folder. How can I do this without losing the post links ? Now the permalinks are %post% but if I move with index.php included to a subfolder, my posts will have the subfolder name in the link ?

Reply

Kimi January 12, 2011 at 11:16 am

Hi Victor,

I am sorry as i don’t really understand what you mean.

Why would you move your wordpress to subfolder? moving site which has already backlinks will hurt your site’s traffic, i have tried with this blog. Because all your backlinks are different links.

If you want to make static pages in wp, i would create a page and make it a static site look, instead of moving files.

For more answers, i recommend, you ask wordpress support: http://wordpress.org/support/

Thanks.

Reply

Victor January 12, 2011 at 12:38 pm

I was asking what if I’d move all wordpress files including index.php to a subfolder, if I do that, my posts permalinks will be changed ? or will be the same ? Right now I have permalinks settings with Custom structure /%postname%/ . Like http://www.blog.web6.org/sample-post/ . The question is if I move all the wordpress files and folders+index.php to a subfolder let’s say “wp” my posts will still be accesible on http://www.blog.web6.org/sample-post/ or http://www.blog.web6.org/wp/sample-post/ ?

Reply

Kimi January 12, 2011 at 12:46 pm

Victor,

The permalink will stay the same :-)

I recommend to back up quick your database first: http://www.blog.web6.org/backup-wordpress-database/

Good luck

Kimi.

Victor January 12, 2011 at 1:07 pm

Thanks Kimi. It’s an idea for the future, I am still researching, the reason is when you use Wordpress with plugins, they make your files a bit messy, and many plugins have their own java script files and CSS files that loads with Homepage, even they are not necesarry. Those extra loaded files (css+js) are sloading the main page.

Reply

Kimi January 14, 2011 at 7:30 am

Victor,

You’re right, thats why i avoid using too much plugins, though if you have a cache plugin, example, w3 total cache, you have an option to minify them.

If i reckon in this blog, Google ads, or infolinks are slowing down because their external js, but we cant do anything about it.

So basically, running a blog without AdSense is going to make your blog a way faster.

Good luck with your blog :-)

Kimi.

Reply

Victor January 14, 2011 at 8:18 pm

Kimi, my files are already minified, and I already have a php script that minifies my js and css files from the theme folder. I was talking about combining external js. You should install an add-on for Firefox named “Firebug” , then click on the icon from the status bar and click on Page Speed. You will see what I am talking about when you’ll run a test on your page or someone else page.
(It’s not about minifying files, it’s about combining them into one file)

Reply

Kimi January 16, 2011 at 6:02 pm

Victor,

I am using YSlow and PS to measure my blog too. I have checked your site, and this is the result (both i measured contents only, since i have ads on my site and you don’t- not fair LOL!)

Mine is 95/100 problems, 3 advertisements images.
Yours is 93/100, problems, many small images that has to be hosted in cached domains.

My conclusion: Using less small images are advantage to load faster, unless you host them on CDN.

So loading speed is not only depending on the scripts, but also on images that your layout use. I know images make more nice..

Reply

Know better? Feedbacks, or Questions? Shoot! :-)

Please use a name instead of blog name or SEO stuff, otherwise it will be deleted right away.

About checkbox → See more my post:how to get rid of spam bots in wordpress post.

Thank you for visiting, you're always welcomed to be here again!

Previous post:

Next post: