Copy and pasted from the Codex (which is blocked from China). Appoliges for not reformatting but it is time to go home from work:
Giving WordPress its Own Directory While Leaving the WordPress Index File in the Root Directory
There are times when you may need more control over where your WordPress files are on your server. You can have the core WordPress files in their own directory and limit the only WordPress files in your root directory to the index.php and .htaccess files. Some users want WordPress to power their site, but they also want to have their other programs and directories segregated from WordPress to avoid conflicts.
To begin, you need three pieces of information:
1. The new address to which you will have moved the WP core files (eg. https://example.com/wordpress)
2. The new address of the directory to which you will move the basic index.php (eg. https://example.com)
3. The path in the file system to the new location to which you will move wp-blog-header.php (eg. /home/user/public_html/wordpress/wp-blog-header.php).
Note: To find the file system path to a directory: in a blank text file, add the following and save it as a PHP file, such as filesystem.php, and upload it to the directory for which you want to find the path. Run it by typing in the address in your browser to the file such as https://example.com/wordpress/filesystem.php:
<?php echo dirname(__FILE__); ?>
The process to move WordPress into its own directory and have the index.php in the root directory is as follows:
1. Create the new location for the core WordPress files to be stored.
2. Go to the Options panel.
3. In the box for WordPress address (URI): change the address to the new location of your main WordPress core files. Example: https://example.com/wordpress/
4. In the box for Blog address (URI): change the address to the new location of the index.php file in your root directory. Example: https://example.com/index.php
5. Click Update Options.
6. Move your WordPress core files to the new location. This includes the files found within the original directory, such as https://example.com/wordpress along with all of the directories in that directory, to the new location.
7. Copy the index.php and .htaccess files from the WordPress directory into the root of your site.
8. Open index.php 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(‘./wordpress/wp-blog-header.php’);
10. Login to the new location. It might now be https://example.com/wordpress/wp-login.php
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.)
Caveats
The only catch is the “Edit this” links will no longer appear by every entry and comment if you’re using this option. This is a limitation of how we’re setting cookies, and this may be fixed in the future.
[Just an aside – is the google cache of the codex blocked too?]