Having a WordPress site is great – there are so many advantages to it. There are also reasons you should have it in its own directory (see below). But, as a matter of professionalism, you want your urls to be clean when the public visits your site. In other words, I wouldn’t want people to have to type https://www.websitedesignerinseattle.com/wp/ to get to my site, right? Even though that is actually where it lives. I want people to type https://www.websitedesignerinseattle.com/. Makes sense – it’s much more professional.
A Few Words About File Management
First I should mention that I have a thing about file management. There are few things that annoy me more than when I’m hired to redesign a website and I find that the last web designer had a million files just sitting in the root directory with no thought to file management. It’s disorganized and can be overwhelming to make heads or tails of it all. It’s like walking into someone’s kitchen and all of their plates, cups, pots, pans, utensils are all just sitting on the counter piled into one jumbled mess. Come on people, separate your things and put them away. Sure it takes some thought at the beginning, but in the end, it will make your life much easier if you know where everything is.
WordPress and File Management
When you are first setting up your WordPress blog you’ll have a choice about where you install it. If you’re doing an install through a hosting service (GoDaddy, Network Solutions, etc.) you’ll be asked which directory in which to install it. I always use something really clever like “wordpress” or “wp” or “new” or “blog”. Super-creative, I know. If you’re doing a manual install, same thing applies, just create a folder and put all of your wordpress files there and proceed with installation.
But I want it to look like it’s in my root directory
I know, I know… it will. But first let me say this about your root directory. While you’re building your website, you shouldn’t have it visible to the public anyway. You don’t want to have your work in progress out there for people to look at. Make a nice looking “coming soon” page with all of your contact info, in a style that matches your brand with your logo for index.html page of your root directory. Then when you’re done building your new snazzy WordPress blog site you can make the switch.
Making the Switch
You only need to alter a couple of files to make it look like your WordPress site is your root. The first thing you need is FTP access. If you did a manual install, you obviously have this. If you installed your WordPress site through your web host, you have two choices: 1) you can use their FTP client (by the way, FTP stands for File Transfer Protocol. You had to define an FTP user name and password – different from your account log in – when you set up your hosting); or 2) you can use a third party FTP client (Dreamweaver, WinSCP, FileZilla, etc.) to upload/download your files. Either way, these are your instructions:
1) Log in to the Dashboard of your WordPress site
This will automatically change the .htaccess file on the server.
3) Open up your FTP Client or navigate to files using your web host’s file management tool. Copy (IMPORTANT: COPY, DON’T MOVE) the files .htaccess and index.php into your root directory.
4) Open up index.php and make sure the line at the bottom that reads: require(‘wp/wp-blog-header.php’); is pointing to the directory where your blog actually lives (in this case, the directory is ‘wp’).
Upload the files to the root directory. And that’s it.