I'm new to WordPress and have been developing a new website that will replace an old non-WordPress site. WordPress is currently installed in a subfolder whilst I've been creating the new site and it's now ready to go live. (Just to point out, it's a static website without any of the blog stuff going on).
There are two things I want to accomplish now and I think I know what needs to be done but I just want to confirm that I'm on the right track:
1) The current (old) website is on www.xyz.com and the new WordPress site is at www.xyz.com/wordpress. I want to make sure that when someone now goes to www.xyz.com, they get to the new WordPress site (i.e. www.xyz.com/wordpress).
- in WordPress admin, go to Settings => General
- change "Site Address (URL)" to be "www.xyz.com" (leave "WordPress Address (URL)" as "www.xyz.com/wordpress")
- save changes
- copy .htaccess and index.php from \wordpress subfolder into root (i.e. public_html)
open index.php and change:
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
to be:
require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
2) I don't want to have to include "index.php" in links to the new site; i.e. I want to be able to go to www.xyz.com/some_page and not have to use www.xyz.com/index.php/some_page
edit .htaccess file and include in it:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
I'm not sure if that last RewriteRule line should include the /wordpress subfolder or whether it's not required due to the previous change to index.php? Or would I need to change it to:
RewriteRule . /wordpress/index.php [L]
Thanks