You can also install it into a directory and then just replace the index and .htaccess files in the root domain to point to it when you are ready to go live. Just rename the index.php and .htaccess files that are there to -old or something in case you need to switch back. Make sure you have a backup before you do any of this work on your site and make copies of the files you work on as well.
So you have your original site here:
https://www.example.com/
New site you want to work on goes here:
https://www.example.com/wordpress/
When you are ready to go live:
Go to the General Screen.
1. In WordPress address (URL): set the address of your main WordPress core files. Example: https://example.com/wordpress
2. In Site address (URL): set root directory’s URL. Example: https://example.com
Click Save Changes. (Do not worry about the errors that happen now! Continue reading)
3. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. 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. For the index.php file the instructions remain the same, copy (don’t move) the index.php file to your root directory. The web.config file, must be treated differently than the .htaccess file so you must MOVE (DON’T COPY) the web.config file to your root directory.
4. Open your root directory’s index.php file in a text editor
Change the following and save the file. Change the line that says:
require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
to the following, using your directory name for the WordPress core files:
require( dirname( __FILE__ ) . ‘/wordpress/wp-blog-header.php’ );
5. Login to the new location. It might now be https://example.com/wordpress/wp-admin/
6. If you have set up Permalinks, go to the Permalinks Screen 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.)
-
This reply was modified 6 years, 10 months ago by James Huff.
-
This reply was modified 6 years, 10 months ago by dtlevin.
-
This reply was modified 6 years, 10 months ago by dtlevin.
-
This reply was modified 6 years, 10 months ago by dtlevin.