I am trying to install WordPress in a subdirectory. This is a new fresh install. Here is what I did:
Assuming my site is example.com
, and I wanted to install wordpress in example.com/wordpress
A) I created a database on the server
B) I copied all wordpress directories to example.com/wordpress
C) I moved index.php from example.com/wordpress
to example.com/
D) I modified the last line of index.php
from:
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
and it got modified into:
require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
E) I modified wp-config.php
and updated it in accordance with the required DB name, user name, password, and server name
Now, when I test hat locally, and when I go to example.com
, I get redirected to the WordPress installation setup page. However, on the live server, I am redirected to http://www.example.com/wp-admin/install.php
(notice the missing wordpress folder, the redirect should be to http://www.new-example.com/wordpress/wp-admin/install.php
).
I have done this before, but not sure what is causing the problem. Can you please help? I really ran out of ideas. I tested everything I can think off (including typos), but to no avail. Please help.
Thanks.