I'm trying to install WordPress on my localhost with composer. When I go to localhost I get redirected to localhost/wp-admin/setup-config.php. Instead of getting the install I'm getting the error The requested URL /wp-admin/setup-config.php was not found on this server. When i go to localhost/wordpress/wp-admin/setup-config.php it works? What am I doing wrong?
This is my directory tree :
-- .git
-- .gitignore
-- composer.json
-- composer.lock
-- vendor
-- htdocs
----- index.php
----- wp-content
----- wordpress
----- wp-config
In the htdocs/index.php
I have this
define('WP_USE_THEMES', true);
require( dirname ( __FILE__ ) . '/wordpress/wp-blog-header.php' );
And in my htdocs/wp-config
I edited this :
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
define('WP_CONTENT_DIR', dirname(__FILE__) . '/wp-content');
define('WP_CONTENT_URL', 'http://' . $_SERVER['SERVER_NAME'] . '/wp-content');
wp-config.php
(other than passwords etc.) &.htaccess
(apache) or NginX configuration?