Some background:
My website with blog had been moved to a new hosting company. Everything worked great. I periodically logged into the blog to update wordpress whenever prompted and all was well.
Months passed, I hadn't connected to the blog (I suck as a blogger, but what I have up I want to remain available), and I got "error connecting to database."
I found the hostname for the blog's database on the web site for the hosting company, so added that to the wp-config.php file (instead of 'localhost'). I had also used their file manager to move the directory holding the blog from the old locatoin to a new then updated w-config.php Now if I try to go to the blog it is prompting me to install wordpress.
Questions:
Are there . files that I can't see in the host's file manager that need to be moved over? If so, I'll have to figure out command line access.
Are there files that should NOT be there that make it look like it's being installed?
Any ideas/questions?
Thanks much in advance!
Some background:
My website with blog had been moved to a new hosting company. Everything worked great. I periodically logged into the blog to update wordpress whenever prompted and all was well.
Months passed, I hadn't connected to the blog (I suck as a blogger, but what I have up I want to remain available), and I got "error connecting to database."
I found the hostname for the blog's database on the web site for the hosting company, so added that to the wp-config.php file (instead of 'localhost'). I had also used their file manager to move the directory holding the blog from the old locatoin to a new then updated w-config.php Now if I try to go to the blog it is prompting me to install wordpress.
Questions:
Are there . files that I can't see in the host's file manager that need to be moved over? If so, I'll have to figure out command line access.
Are there files that should NOT be there that make it look like it's being installed?
Any ideas/questions?
Thanks much in advance!
If you moved the folder of the root of the site, so that the URL is https://www.example instead of https://www.example/blog , then you need to tell the database that's where the site lives.
This is done by modifying two entries in the wp-options table to change the URL. You will also need to change the URLs that are stored in the database for media files - each media file has it's full URL as part of the database.
To do that, you can use a "search and replace" plugin (I like "Better Search and Replace", but there are others) to search for the old URL (https://www.example/blog ) and replace it with the new URL (https://www.example ). But that should be done after you can get to the site and the site's admin area.
You may also need to change your htaccess file, since you moved the site's URL out of a folder to the root of your domain.
There are several help files you might find useful: