![]() There can be a variety of reasons this error happens and I will take you through some additional scenarios. If you verify that your connection information is indeed correct, move on to these other fixes outlined below. Your wp-config.php file is the first place you should start when trying to fix this issue. If you’re on Flywheel, they’ll just move everything over for you and make sure that you’re up and running, taking the hassle out of having to figure out any of these configurations. That way you can confidently cancel your old hosting account without losing any data and seeing the dreaded “Error establishing a database connection” error. The best practice is to move everything to your new hosting company and update your wp-config.php file to reflect the new database. The issue here is that when you finally cancel your old hosting, the website will go down because you were connecting to the database on the old hosting account, thus producing the “Error establishing a database connection” error message. The site will still show up when you go to the URL and the site will still function. And while that can be extremely helpful for speeding up your site, don’t forget – there’s the back. Last week, I talked about how to speed your site up with a focus on the front-end performance. You can safely skip this next reason if you’re using a managed host. On hosts like Flywheel, you’re not actually able to edit this file, as it’s configured for you. This file is where you define your database connection information such as Database Name, Username, Password, and Host. Out of all the WordPress PHP files required to make WordPress run, wp-config.php is the most important because without that file, your site can’t connect to its database and your site won’t work. But if you’re using a WordPress host that makes you install and manage WordPress yourself, or if you’re developing on your local computer, you may run into this issue. Of course, any good managed WordPress host should configure everything for you and ensure that these errors never arise. ![]() The latter is the scariest version of this error because it usually catches you off guard. You may see this error when trying to install WordPress manually or you’ll see this error in large black font on a white screen in your browser when you try to pull up your website or local development environment. But for those of you new to WordPress, this can be a scary error message. ![]() If you’re a seasoned WordPress designer or developer you can most likely jump right into fixing this error. Oh the dreaded “Error establishing a database connection,” dum, dum, dum (imagine ominous music playing). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |