: Redirecting a domain to another that hosts a wordpress site, getting database errors Originally I had mydomain.com.au, but then I let it expire as I cancelled my abn (Austalian Business Number).
Originally I had mydomain.com.au, but then I let it expire as I cancelled my abn (Austalian Business Number). After that I started using mydomain.info instead to host my wordpress site. Recently I had my abn re-instated so I have mydomain.com.au back again finally.
I decided to do a permanent redirect from mydomain.com.au to mydomain.info, and I put this in /etc/apache2/sites-available/mydomain.com.au.conf file:
<VirtualHost *:80>
ServerAdmin me@email.com
ServerName mydomain.com.au
RedirectPermanent / www.mydomain.info/ </VirtualHost>
It looks the same in /etc/apache2/sites-enabled/mydomain.com.au.conf also.
I reloaded apache2 without error and now I get this error when I try to access mydomain.com.au either locally or from an external IP:
Database Error
Error establishing a database connection
I decided to test whether the redirect was working by putting a dummy html file in /var/www/mydomain.com.au. I reloaded apache2 and tried mydomain.com.au again. Still getting the database error.
So now I'm thinking it's a problem with wordpress. Does wordpress not allow you to do this kind of thing?
More posts by @Berryessa370
1 Comments
Sorted by latest first Latest Oldest Best
A successful database connection requires at least:
An active database daemon running on the server. Ask your provider here.
The hostname that the database is on
The port to connect to to establish a database connection. This is normally 3306 for MySQL databases with a standard configuration.
A valid database name
The correct username
The correct password
If the domain switch also involves changing the disk that your web server is on then you will have to go back to the old server and backup the database as a large file and then reinstall it onto the new server BEFORE they decide to fully cancel the old server to the point where they reformat the hard drive. Just make sure if you do this, you set the domain name to the new domain name when you actually connect to the database.
I'm not fluent with drupal, but I'm sure theres a file in drupal that stores the database settings, and all you really have to do there after transferring everything over (including the database contents) is change the database hostname.
I think there are packages that allow you to do this easily such as PhpMyAdmin.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.