All websites have to be updated from time to time. If you read the documentation they tell you to install wordpress in the root directory, which is fine if you are never going to change anything. On the other hand you should be planning for the future.
Start off by creating a folder in the root directory of your hosting package. The name of the directory is irrelevant so choose something that suits you. One word of warning, most will tell you to use something like wordpress. I, on the other hand, would use something else because you can only use it once. Choose something that when you update you can use the next one in the sequence. EG: “January”, “February” or “wordpress_2012”, “wordpress_2013”.
This directory is where you are going to install your wordpress. By setting up your wordpress in this way, in the future when you want to reconfigure your site, all you will have to do is create another folder (the next in the sequence) and install a separate wordpress in the new folder. While you are working on your site or new site you will be able to access it with the following url http://yoursite.com.au/yourfolder/wp-login.php. Of course you will replace yoursite.com.au with the url of your site and yourfolder with either of the folders your sites are in, depending which on which site you want to login to.
When you are ready to go live with your new site you will only have to change one line in the existing index.php in your root directory and update the .htaccess file and your new site will be live.
Below are the full instructions how to set up your site in this way.
1. Download and install the latest version of WordPress in a new directory on your web host plan. Eg: “yourfolder_2012”
2. Add or edit your robots.txt file in your root directory and block access to your new folder because while you are in the setup phase you don’t want search engines to crawl your site.
a. Add the following to your robots.txt file with each item on its own line.
i. User-agent: *
ii. Disallow: /yourfolder/
3. Log in to your dashboard and install the Maintenance Mode plugin
a. Search for “maintenance mode” in the plugin installer in your new wordpress site
i. WordPress> Plugins> Add New>
ii. Configure the maintenance mode plugin to block access to your new site.
b. Go to Maintenance Mode settings
i. Plugins> WP Maintenance Mode> Settings>
ii. Change Plugin Activate to “true”
iii. You can set any of the other features you want at the same time.
4. Each time you want to add content to your new site you will be able to go to
a. http://yoursite.com.au and click the link and login on the next screen or go directly to
b. http://yoursite.com.au/yourfolder/wp-login.php and login.
5. Add your content and code to your site
a. Test your site, make sure every thing is working the way you want it to.
i. When everything is working, and not before, move on to the next section.
ii. Remember test, test, test and test again.
Ok, so you have decided it is time to make your site live for all to see. Below is the second half to this wordpress installation guide.
6. Log in to your dashboard.
a. Goto Settings> Permalink>
i. Change the permalink settings and save changes.
ii. If you want to use the settings that are currently in use change the permalink to something else and then change them back again.
b. Go to Settings> General>
i. In the Site Address (URL) text box enter http://yoursite.com.au
ii. Click Save Changes.
iii. If you receive an error message do not worry. Also, do not try to see your wordpress site at this point!
iv. You may get a message about file not found.
c. Log out of the dash board if it will let you.
7. Copy (DO NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your hosting package (http://yoursite.com.au).
a. The .htaccess file is usually invisible, so set your FTP client to show hidden files.
b. If you are not using pretty permalinks, then you may not have a .htaccess file.
c. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
d. In a text editor open the index.php file that is now in your root directory.
i. Locate the line that says
(1) require(‘./wp-blog-header.php’);
ii. Change it to
(1) require(‘./yourfolder/wp-blog-header.php’);
8. Login to the dashboard on your site. It should be
a. http://yoursite.com.au/yourfolder/wp-admin/
b. Go to the Permalinks panel Settings> Permalink> and update your Permalink structure by clicking the Save Changes button.
i. WordPress will automatically update your .htaccess file if it has the appropriate file permissions to write to the .htaccess file.
ii. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should copy into your .htaccess file (in the same directory as the main index.php file.)
c. Then go to the installed plugins panel and scroll down to WP Maintenance Mode and click settings
i. Plugins> WP Maintenance Mode> Settings>
ii. Change Plugin Activate to false
9. Open your robots.txt file in a text editor and remove the line
a. Disallow: /yourfolder/
b. Then save and close your robots.txt
10. Read my post Update Services – ping lists.
Please feel free to leave comments and suggestions.