Moderator
t-p
(@t-p)
– Using FTP/ SFTP , or your web-host’s cPanel or whatever file management application your host provides, access phpMyAdmin on your host, then find your DB, there check the wp_options Table (Note: The table prefix of wp_ may be different if you changed it when installing), and make sure siteurl field and home field are correct. See https://codex.wordpress.org/Changing_The_Site_URL#Changing_the_URL_directly_in_the_database
– If you haven’t already done, always backup your database before doing any actions, just in case something really goes wrong. You can never have enough backups!
So Dave was your WordPress installed in example.com\test and now you want to access it from example.com instead?
By Changing it in WordPress is not going to work as you need to copy index.php and .htaccess from the test directory and paste it into the root. Then you need to edit the index.php file so that it points to the test folder.
See this on the Codex: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
I use method 2.
Hello!
Thanks for your replies.
So first I installed my WP in the root directory, but then I wanted to move it to root/test, because I wanted people who access the site example.com to be redirected to a FB page. And I wanted to able to keep developing the site on the address example.com/test.
So I copied everything from root to the subfolder, with changing information in WP settings and also htaccess. But I found out, that it’s not really possible to redirect people from example.com to FB page and have a functioning site on example.com/test (or at least I wasn’t able to do it). So I wanted to reverse everything.
I copied the content from the subfolder to the root, tried to set back everything (WP settings, htaccess) and I also added a rule to htaccess which redirects all the IPs to the FB page, except mine. But still after that, the homepage wasn’t really showing.
Then I tried it on my different notebook. Lo and behold, it was working there. Thanks to that I figured out, that probably I needed to clear my cache. After doing that it is now working just fine.
After all it seems like I did everything right regarding the migration of the site (thanks Google!), but clearing the cache on my notebook was the culprit.
Anyway, thanks for your help, guys!
Have a nice day!