Reputation: 123
I had setup wordpress on /blog
directory. Everything was perfect. Today I tried to tweak 2-3 things as it was not coming up on server. I came to know about siteurl
and home
to be defined. But after a little while its not working now anymore. I rolled back all changes (there were only 3 changes), but still issue is not getting solved.
So while I configured wordpress it was running on http://localhost:5000/blog
. For this reason, options
table is also having this
1 siteurl http://localhost:5000/blog yes
2 home http://localhost:5000/blog yes
3 blogname Stockarea yes
4 blogdescription Just another WordPress site yes
But now when I am running it back on same url that is http://localhost:5000/blog
it redirects me to http://localhost/blog
and gives error 404 - Object not found!
. I have rolled back everything to its initial state and still it is like this.
I even tried to add this in wp_config.php
define( 'WP_HOME', 'http://localhost:5000' );
define( 'WP_SITEURL', 'http://localhost:5000' )
But no luck at all. Tried restarting xampp server still no luck. Why is wordpress redirecting me to htdocs folder
Upvotes: 0
Views: 784
Reputation: 15
Open wp-config.php file in the WordPress folder, and set site
url(define('WP_SITEURL','http://localhost:5000/Stockarea/index.php');
folder name
Upvotes: 0
Reputation: 1718
Open wp-config.php file in the WordPress folder, and set following parameter.
define('WP_HOME','http://localhost:5000/blog');
define('WP_SITEURL','http://localhost:5000/blog');
Please check your .htaccess file, hope the below code solve your issue :
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
Upvotes: 1