Reputation: 2655
I have a Wordpress site that was installed in a /wordpress/ folder, so when you try to access the website it will look like www.example-domain.com/wordpress/
The problem is recently I decided to move it to the root directory so that the site can be accessed by just going to the www.example-domain.com
So what I did first is download SQL dump, then delete the old installation of WordPress, installed a fresh one and overwrite the Database using SQL dump. Everything went well, but when I tried to view the site this came up.
And I also noticed that whenever I tried to access to the dashboard through www.example-domain.com/wp-login.php
It will say that it is missing
The requested URL /wordpress/wp-login.php was not found on this server.
So I am under the impression that it still points to the old installation.
How can I fix this?
Upvotes: 0
Views: 837
Reputation: 4799
You need to login to the database and manually edit 2 entries. In the wp_options
table you can find siteurl
and home
. Update those appropriately, you should then be able to login properly.
You also need to update your .htaccess
file but if you edit your permalink options and then change them back this should rewrite it for you.
For future reference to simply change directory of your installation if you login to the WP admin and go to Admin -> Settings -> General you can change the Wordpress Address and Site Address (the options you changed manually in the database) there. Once changed simply copy the entire installation folder to the new location and that will be it. It's easier to make the changes before you move it than after.
Upvotes: 1
Reputation: 2764
Update the table wp_options
for siteurl
and home
with respective values.
Also change .htaccess
file
Upvotes: 1
Reputation: 810
You need to set a couple of paths in the database to the new directory.
try to search for records that include "/wordpress" and remove it.
This solved a similar problem for me.
Upvotes: 0