After changing domain, Wordpress does not connect to database, user does, before the change, WP was working

In Virtualmin>domain>edit databases does your database show up for the new domain name?

If yes? make sure the username is correct.
If No? Import the database.

Hello @cyberndt, yes the WordPress database is there, in the accountā€™s databases list, I can manage the database through Virtualmin, I created a second user.

I also used Adminer, a single php file to administer databases and I can connect and modify the WordPress database, with the original user and its original password as well as the second user.

I changed a couple of records of a table there, no problem. In fact, WordPress knows about the database because if I place the wrong password it issues an error, please see this post:

Thanks and regards

Hello @Whoops and @Gomez_Adams , I wonder if I can create a subdomain, for example: site.newdomain.com and doing thai I will that provide an isolated environment of the root home/newdomain/public_html/ where I can test, copying all wp installation files, and to copy the wp database to a new database with new db user and to assign these to the database/user configuration into wp-config.php of the subdomain and to update WP from 5.7 to 5.8.2 but only in the subdomain: site.newdomain.com, whitout affecting the WP 5.7 of the root: home/newdomain/public_html/ and to see if the website runs well on http://site.newdomain.com.

Can I do this tests without disturbing the original WP 5.7 installation and its original files and database?
Thanks and regards

You can create a new subdomain and import old site to test. I would be tempted to rename domain back to olddomain, if that is a possibility and you still own the domain. Check to see if Wordpress settings then work. If OK then create a new virtual server with new domain and then import old data. The old virtual server can then be archived. Backup virtual container before doing anything.

1 Like

Thanks a lot, @Whoops , when you say import you mean copy-paste or there is an import method, sorry if the answer is obvious, Wordpress is new to me.
Thanks for all your advice and regards

I dont know too much of Wordpress specifics as I dont use it. Others will have more knowledge of the said system. I dont know how you would normally backup Wordpress and move. @Gomez_Adams is probably the man for that. Assume you will need a working app under both web accounts then use the Wordpress tools to export and re import to new location.

However, in general you will need to adapt the config file to reflect database settings and possibly web paths.

@Whoops hi, if you still have an issues with this problem, I am available for hire to help you, offering one to one chat at your local times etcā€¦ If you are interesting, we can do troubleshoot this together in no timeā€¦ just see my contact details on my profile.

Thanks for the offer but its not me but @joejac who has got the problem :smiley:

@Whoops i guess my bad :slight_smile: sorry about itā€¦ @joejac please see my previous reply.

Thanks.

hi, i can sort your issues within Ā£90 feel free to contact me here.

Thank you very much to all, I am working on that, fortunately the website was still on construction.
Regards

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.