I’m trying to run wordpress through XAMPP (on Ubuntu). I copyed wordpress forlder into /opt/lampp/htdocs/www.
After I’m entering my database connection details I’m getting this error: “Error establishing a database connection”.
And there are no ‘wp-config.php’ file, so I tried to rename sample file, edit it, but after that I’m getting the same error.
(MySQL Database is running).
This topic was modified 7 years, 7 months ago by i6.
Everytime I hear about this error it is almost ALWAYS because something is wrong within the credentials. It sounds like you are developing locally since you mentioned Ubuntu and a local path.
Simplified install: copy all WordPress files to the root path (www). Personally, if you are only working on 1 or 2 sites, there is NO need to create a DB. MySQL has a test DB included for the purpose of testing/developing (it’s in the docs). After copying the files, just goto ‘localhost’ in your browser. The WP installation will start. Enter ‘test’ as DB name, ‘root’ as the DB username and leave the password blank. That’s it…you’re done.
Do not rename the sample wp-config…if wp-config.php does not exist then the install did not complete.
Doesn’t help – the same error.
Also if I’m trying go to phpMyAdmin I’m getting this: Error during session start; please check your PHP and/or webserver log file and configure your PHP instalation properly. Also ensure that cookies are enagled in your browser.
I checked cookies, cache, tried different browsers.
Glad you got it workin! As I stated, the built in test DB and root user are fine for local dev, but obviously will need to be tweaked to something much more secure once you move to the web. Here’s a plugin that is absolutely amazing for moving sites to the web and vice versa: https://wordpress.org/plugins/duplicator/
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Error establishing a database connection’ is closed to new replies.