Install WordPress files to a Subdirectory but Run your Blog off the Root Directory
At TechCounter, the WordPress files are installed to a Subdirectory? So you ask the question, how can I access your blog at http://www.techcounter.com and not at techcounter <dot> com/subdirectory.
Many people like you want to WordPress to run of their site’s root directory ( e.x http://yoursite.com ) but don’t want all of the WordPress files cluttering up their root directory. In this article, I will tell you how to Install WordPress files to a subdirectory, but run your blog off your site’s root directory.
1. Create the new location for the core WordPress files to be stored (we will use /myblog in our examples).
2. Go to the Options panel in your WordPress Dashboard. Go to General tab
3. In the box for WordPress address (URL): change the address to the new location of your main WordPress core files. Example: http://yoursite.com/myblog
4. In the box for Blog address (URL): change the address to the root directory’s URL. Example: http://yoursite.com

5. Click Update Options
6. Move your WordPress core files to the new location (myblog address).
7. Copy the index.php and .htaccess files from the WordPress directory into the root directory of your site (yoursite address).
8. Open your root directory’s index.php file in a text editor
9. Change the following and save the file. Change the line that says:
require(’./wp-blog-header.php’);
to the following, using your directory name for the WordPress core files:
require(’./myblog/wp-blog-header.php’);
10. Login to the new location. It might now be http://yoursite.com/myblog/wp-admin/
11. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)
If you liked this article, click here to buy me a coffee!Popularity: 23% [?]


March 31st, 2009 at 2:20 pm
Can two WordPress installations run under a same domain? One in the root and the other in the /blog/ directory? I have the one installed in the root, and not when I try to install the second one - that is in the /blog/ I get an 404 error from the first (root) one.
Can I install the two somehow?
March 31st, 2009 at 10:03 pm
Ммм, где ещё можно такие творения увидеть?
July 4th, 2009 at 1:24 pm
Да уж… Тут как говорят люди: Азбуку учат — во всю избу кричат
August 20th, 2009 at 6:15 pm
Тут уже столько написали комментов до меня. Осталось только присоединиться.
December 16th, 2009 at 7:17 pm
Hi, I found your web site when i was searching Google for web sites related to this content. I must tell you, your site is good. I like the theme too, its pleasing. I dont have the time now to fully read your web site but I have bookmarked it and I also signed up for your RSS feed. I will be back in a night or two. Thanks for an informative blog.
October 3rd, 2010 at 9:00 am
Nice and useful article…thnx…
October 12th, 2010 at 7:07 pm
30. Hi, your article is very instructive and I actually like the content material where in every element is extremely important. By some means, it gives me more knowledge about issues that is happening nowadays.
October 13th, 2010 at 2:57 am
Thanks. I’d been wondering about how to tackle this issue in WP myself recently.
October 28th, 2010 at 8:18 am
home security should be the first priority of everyone because we should always protect our assets**.
November 17th, 2010 at 12:34 am
there are lots of cheap home security gadgets that you can buy online these days, i can find most of them from ebay **`
December 19th, 2010 at 2:01 pm
Thanks for it, a very good post !
January 19th, 2011 at 2:56 am
This is really my first time here, great looking blog. I found so many interesting things in your blog especially its discussion. From all the remarks on your articles, it appears such as this is often a extremely popular website. Continue the great work.
January 22nd, 2011 at 2:50 am
I like the theme too, its pleasing. I don�t have the time now to fully read your web site but I have bookmarked it and I also signed up for your RSS feed.
January 22nd, 2011 at 2:51 am
WordPress will automatically update your .htaccess file if it has the appropriate file permissions.
May 1st, 2011 at 3:30 am
It’s pretty nice how you are able to customize wordpress like that!
-Jean
June 2nd, 2011 at 1:39 am
Fantastic website, partner! Install WordPress files to a Subdirectory but Run your Blog off the Root Directory | TechCounter - TechNews, Money & SEO is absolutely a thing. I’ll be starting my own quickly and i also will certainly replicate aspects of your own, lawfully naturally
July 9th, 2011 at 12:26 pm
Your site was very nice
July 23rd, 2011 at 3:07 pm
Nice Finding. It will be useful to everyone who will be able to use this information, including myself. Keep up the good work.
August 24th, 2011 at 1:21 am
I am glad to be a visitor of this gross web site, regards for this rare info!
September 15th, 2011 at 5:02 am
Hey great write-up , Thank you for giving this information
December 27th, 2011 at 4:37 pm
Can I take advantage of a number of Search engine optimization plugins for my blog. I have all-in-one seo and google xml sitemap. But trying to download extra for the additional help. Will this have a damaging effect on my rankings or will it help tremendously? Thanks very a lot