Hi guys welcome again to Guideclass.com, and everyone talks about blogging, website creation, even some people share their website ranking methods.
If you have a website then errors still exist, but a professional blogger can handle all these errors easily.
But I know you all are new in the Blogging, and you don’t know about all this technical stuff, even though many people don’t know how to install WordPress.
So today in this post I am gonna share with you the Error establishing a database connection, I tell you why this error comes, and what is the solution.
Hi guys my name is Viswanath and I am a professional blogger, I have many websites and I make websites every day for me and for my clients, so I have very good knowledge about all these problems or Blogging.
If you don’t read my old post then you are missing a golden opportunity. I share all the excitement in my old posts so make sure you visit all that.
And if you see this error (Error establishing a database connection) then this post will help you 100% so guys let’s start our today’s titled how to fix Error establishing a database connection.
Before talking about the fixing error, let’s know why this error comes to a website, because this is automatically shown, and people get tensed about this error.
The last time one of my Subscriber sent me a mail, he said sir my website showed me Error establishing a database connection this error, and I deleted the site and re-installing it, but the error still exists.
He delete the website and his posts or pages are also gone, which means his work is totally west, if he do a proper research and contact me before deleting the site, then his work is maybe safe.
But what can i do? I fix the error but all the posts and pages are already dilated, and there is no way to backup them, because he use a local or very cheap hosting.
Why come Error establishing a database connection?
Now the first problem is this using a local or cheap untrusted hosting, they don’t have backup options, they don’t have latest update feature, they don’t have pure SSL, many local companies use free SSL, and people who are new on blogging they’re thinking about the price and buy such a useless hosting.
So don’t get local server, because they don’t have automatic update even I saw in many local companies who doesn’t have latest PHP version.
This is the main problem for this error (Error establishing a database connection) 99% of websites have this erròr because their hosting is not good.
So to avoid this error and run a better website go with a trusted hosting company, well I already wrote posts about best web Hosting, you can read them if you want.
Problem number 2 of Error establishing a database connection.
Sometimes new people don’t have any knowledge about web making, or File management on a website. Or managing a server is very difficult for them.
So people watch videos on YouTube for the solution or add some new features, and many videos are available in YouTube is totally fake.
There are so many so-called SEO experts on YouTube who share wrong information.
And new people believe in them, because they don’t know anything, and they try those tips which are provided in YouTube videos.
And due to wrong information people delete the main files, or sift the website to a different folder, sometimes people delete the database.
And this creates a problem whose name is Error establishing a database connection. If your database is not connected to a targeted user, or a targeted file folder the this error can show you.
Sometimes people use too many cache plugins on the website, and due to overlap cache files the database is deleted, or the server antivirus blocks all the files note: this can happen in a trusted hosting provider, like Namecheap, Hostarmada, Hostinger, etc.
And if your server blocks the site or database then this error can show you. Error establishing a database connection.
Now comes to the fixing part, that how you can fix the Error establishing a database connection.
How to fix Error establishing a database connection?
To fixt this error you need to do just a few simple things. Just go to your Hosting File manager, if you have Cpanel the log in to your Cpanel and visit File manager.
Then check all the file you have in your domain root folder. If you don’t have alll the files then check where you move all the files.
Just found the file’s move it to the domain root folder, once files are back your error is fixed automatically.
Step 2 if your files are exists in the root folder but you still face this problem, then go to your database.
And also visit the wp_config.php file click edit by clicking on the mouse right-click, then check the database username and the password.
Then go to the database section, you can search the Mysql database in your Cpanel search bar. Then check your database name and the user password.
And then replace it in your wp_confg.php file database detail section, then save it. And your site error is fixing automatically.
Sometimes people change the PHP version, but they don’t know the hosting server, if the server support latest PHP version then you can Update it.
But if your server does not support the latest features then don’t update anything, unless you talk to your hosting provider.
Or sometimes people install Nulled or crack files like Themes or plugins, and these files remove the site header section or maybe the database connection.
If you install any such files the delete it from your file manager. Go to your Cpanel and visit filemanager, then click Content then click Plugin if you install nulled plugin or click theme if you use a nulled theme.
Then delete it or delete advanced cache files too for quick response. Once you delete the virus containing files your site live automatically.
Or sometimes the local hosting server is down due to overload, and in this case you don’t need to do everything, just wait for the server live or contact your hosting provider.
That’s it, follow these tips to fixing the Error establishing a database connection problem.
Guys, I share all these tips after I use many hosting providers, and sometimes I create these errors and then I fix the error, so if your site still has Error establishing a database connection after following my tips. Then you can contact me at [email protected] I’ll solve your problem within 1 hour.
And if this post is help you to fix the error then share it with your friends. THANK YOU.