I was moving a prod wordpress blog to a dev environment for development work. I have been following these instructions.
The domain name is going to change. I have edited the wp-config.php file with the new names and database credentials. However, I keep getting the same error over and over again:
Error establishing database connection
I have been troubleshooting this for 2 days now. I now suspect that the database needs to be changed in some way. I faintly remember that the last time I moved a wordpress blog to a different domain… I had to run some kind of database cleanup script. Hmmmm…where was that information 🙁
got it ! here is the script we are supposed to run. I uploaded this script to the /var/www/blog directory and called the script from a web browser.
WOOO HOOO ! 🙂
This was the mssing link…the blog is working now.
However there is one issue…it seems like only the text is being shown on the blog. The theme is not being applied.
Also, only the main page is working…all the links are dead. I remember the solution to this second problem was to reset the permalink settings in WordPress’ dashboard.
I notice that all the links are HTTPS because the prod site runs HTTPS…….the dev does not have a cert. So lets install a cert on the Apache web server. Easy enough. Here are some simple instructions.