Error establishing a database connection - WordPress
-
Hi,
I'm having issues to run my WP site locally. I'm using manageWP as a backup tool and downloaded a full backup from there. Created blank quick app with laragon and extracted the zip file in it and I get the Error establishing a database connection. I am not a developer and have little experience with these things. I just have a small ecommerce site and want to run it locally to make changes. I saw somewhere that it might be the wp_config options but tried everything and it just doesn't load the database. I assume somehow I need to tell laragon that "this is the database to use for this project" but I have no idea from where to do that. I also tried to install fresh local copy of Wordpress using laragon and this worked. Then I tried to copy my backup files to the new folder and all the plugins were turned off and also the database was the fresh and empty one.. Any help would be appreciated!
-
@geekybg :
- You should change your database settings in wp_config.php
username: root password: '' database: your-database host: localhost
- Check if your database exists.
Using root is quick and easy if you are not a developer.
-
@geekybg usually you need to create database manually on your local environment then change your wordpress configuration like @leokhoa post unless your backup provider give you installer for your backup.
-
Thanks for your help! I tried many things but again have no idea what I'm doing and why it isn't working. Will try to find someone who can set it up. Thanks again!
-
I think this tutorial help you to resolve your issue regarding database connection WordPress https://wpitech.com/error-establishing-database-connection-wordpress/