How To Fix The "Error Establishing a Database Connection" in WordPress (2023)

The “error establishing a database connection” is probably one of the most common errors WordPress users can encounter. It’s closely tied to the white screen of death(WSOD). This error means your website is no longer communicating or has access to your WordPress database; thus, your entire website goes down.

You should resolve this error immediately, as this can directly affect your sales, traffic, and analytics.

But don’t worry, today we’ll discuss some common scenarios that cause this error and some easy ways to get your site back up and running in no time.

Check Out Our Video Guide to Fixing The “Error Establishing a Database Connection”

What Is The “Error Establishing a Database Connection”?

All the information on your WordPress site, such as post data, page data, meta information, plugin settings, login information, etc. is stored in your MySQL database. The only data not stored there is media content such as images and your theme/plugin/core files such as index.php, wp-login.php, etc.

When someone visits your website, PHP executes the code on the page, queries the information from the database, and then displays it to the visitor in their browser.

If this isn’t working correctly, you are left with the “error establishing a database connection” message, as seen below. The entire page is blank because no data can be retrieved to render the page, as the connection is not working properly. Not only does this break the frontend of your site, but it will also prevent you from accessing your WordPress dashboard.

How To Fix The "Error Establishing a Database Connection" in WordPress (1)

However, visitors might not see this error on the frontend right away. That is because your site is most likely still serving from cache until it expires. For example, at Kinsta, all WordPress sites are cached for one hour by default. Therefore, if a site is still serving from the cache, it might appear acceptable to a visitor.

At Kinsta, our support team can increase the duration of your cache to, say, an hour or even a week if you want. If you have a site that doesn’t change very often, this can increase your site’s performance as it does not have to grab new files as often after the cache expires. And in cases like the above, the frontend of the site in most cases (unless you have a script or part of your site breaking the cache) would stay up a lot longer.

When visitors try to access your site while this error is happening, it will generate a 500 HTTP status code in your logs. This same status code appears with an “internal server error.” It means that something went wrong on the server, and the requested resource was not delivered. When everything is working properly, your site will generate a 200 HTTP status code, which means everything is fine.

How To Fix The "Error Establishing a Database Connection" in WordPress (2)

If you’re a Kinsta client, you could also look at the 500 error breakdown report in MyKinsta analytics to see if it’s something that has been a reoccurring problem.

How To Fix The "Error Establishing a Database Connection" in WordPress (3)

What Are the Most Common Causes of This Error?

So why exactly does this happen? Well, here are a few common reasons below. And don’t worry, we will go into each of these more in-depth so you can know how to fix them. Typically you can resolve this error in under 15 minutes.

(Video) BETWEEN THE BURIED AND ME - Fix The Error (Official Music Video)

  • The most common issue is that your database login credentials are incorrect. Your WordPress site uses separate login information to connect to its MySQL database.
  • Your database is corrupted. With so many moving parts with themes, plugins, and users constantly deleting and installing them, sometimes databases get corrupted. This can be due to a missing or individually corrupted table, or perhaps some information was deleted by accident.
  • You may have corrupt files in your WordPress installation. This can even happen sometimes due to hackers.
  • Issues with your database server. Several things could be wrong on the web host’s end, such as overloading the database from a traffic spike or being unresponsive from too many concurrent connections. This is common with shared hosts as they utilize the same resources for many users on the same servers.
  • A spike in traffic. Depending on the web host you use, your server might be unable to handle many concurrent database connections. An increase in traffic can lead to temporary problems with the database.

How To Fix The “Error Establishing a Database Connection”?

Before troubleshooting the error, we recommend taking a WordPress site backup. Many of the recommendations below involve manipulating information in your database, so you don’t want to make things worse. You should always backup before trying to fix things on your WordPress site, no matter how tech-savvy you think you are.

You can use a popular WordPress backup plugin such as VaultPress or WP Time Capsule to backup your files and database.

If you are a Kinsta user, you can take advantage of our one-click backup feature. Click into your WordPress site in MyKinsta, click on “Backups” and then on “Back up now.”

How To Fix The "Error Establishing a Database Connection" in WordPress (4)

You then also have the option to restore a backup to production or staging. Or you can manually backup your MySQL database using phpMyAdmin. Once you have a successful backup, it is time to troubleshootyour database connection issues.

1. Check Your Database Login Credentials

The first thing to do is check to ensure your database login credentials are correct. This is by far the most common reason why the “error establishing a database connection” message occurs. Especially right after people migrate to a new hosting provider. The connection details for your WordPress site are stored in the wp-config.php file, which is generally located at the root of your WordPress site.

It contains four important pieces of information that must be correct for the connection to occur successfully.

Database Name

// ** MySQL settings ** ///** The name of the database for WordPress */define('DB_NAME', 'xxxxxx');

MySQL database username

/** MySQL database username */define('DB_USER', 'xxxxxx');

MySQL database password

/** MySQL database password */define('DB_PASSWORD', 'xxxxxxxxx');

MySQL hostname (server)

/** MySQL hostname */define('DB_HOST', 'localhost');

To access your wp-config.php file, you can connect to your site via SFTP and browse to the root of your site. Or, if you are using cPanel, you can click on “File Manager,” browse to the root of your site, and right-click to edit the file.

How To Fix The "Error Establishing a Database Connection" in WordPress (5)cPanel file manager

Here is an example below of what the file looks like when opened.

How To Fix The "Error Establishing a Database Connection" in WordPress (6)

You need to now check your current values against those on your server to ensure they are correct. Follow the directions below for cPanel and Kinsta users.

Check Database Credentials in cPanel

The first thing to check is the database name. To do this, you must log in to phpMyAdmin in cPanelunder the Databases section.

How To Fix The "Error Establishing a Database Connection" in WordPress (7)

You should see your database name at the bottom on the left. You can ignore the “information_schema” database as this is something used by the host. You will then want to compare that name against the DB_NAME value in your wp-config.php file. If they match, then this isn’t the problem. If they don’t match, you need to update your wp-config.php file.

(Video) How to fix file system error in windows 10, 8 and 7.

How To Fix The "Error Establishing a Database Connection" in WordPress (8)

You can also verify this is the correct database by ensuring it contains your WordPress site’s URL. To do this, click on the database and then click into the wp_options table (this might be slightly different for security purposes, such as wpxx_options). At the top of the table, you will see values for your site’s URL and name. If these match your current site, you can rest assured you are in the right place.

How To Fix The "Error Establishing a Database Connection" in WordPress (9)

If your database name was already correct and you still get the “error establishing a database connection” message, you will also want to check your username and password. To do this, you will need to create a new PHP file in the root directory of your WordPress site and input the following code. You can name it whatever you want, such as checkdb.php. Change the values of db_user and db_password with those in your wp-config.php file.

<?php$test = mysqli_connect('localhost', 'db_user', 'db_password');if (!$test) {die('MySQL Error: ' . mysqli_error());}echo 'Database connection is working properly!';mysqli_close($testConnection);

Then browse the file on your WordPress site: If you get a “MySQL Error: Access denied,” then you know your username or password is wrong, and you will need to continue to the next step to reset your credentials.

How To Fix The "Error Establishing a Database Connection" in WordPress (10)

Below is the message you want to see, “Database connection is working properly.” But of course, if it were, then you wouldn’t be here. Be sure to delete/remove this file after you are done testing.

How To Fix The "Error Establishing a Database Connection" in WordPress (11)

So next, you need to reset your username and password. In cPanel, click on MySQL Databases under the Databases section.

How To Fix The "Error Establishing a Database Connection" in WordPress (12)

Scroll down and create a new MySQL user. Try and pick a unique username and password so they can’t easily be guessed. The password generator tool they provide works excellent. Then click on “Create User.” Alternatively, you could change the password on this screen for the current database user.

How To Fix The "Error Establishing a Database Connection" in WordPress (13)

Then scroll down and add your new user to your database. The next screen will ask which privileges you want to assign. Select “All Privileges.”

How To Fix The "Error Establishing a Database Connection" in WordPress (14)

Then take those new credentials and update your wp-config.php file. You will want to update the DB_USER and DB_PASSWORD values. You could also rerun the test file from earlier. This should then resolve your credentials issue. If not, you could still have the wrong hostname (DB_HOST). Some hosts use different values.

See a list of some common DB host values. Typically this will be localhost. But you can always reach out to your hosting provider or check their documentation if you aren’t sure. Some might also use instead of localhost.

If you have followed everything above and are still receiving the “error establishing a database connection” message, proceed to the following troubleshooting steps below.

Check Database Credentials With Kinsta

If you are a Kinsta user, checking your credentials against your wp-config.php file and the server is much easier! All you need to do is click on the info section of your site, and towards the bottom, you will see the database name, username, and password. By default, Kinsta uses localhost for the DB_HOST.

How To Fix The "Error Establishing a Database Connection" in WordPress (15)

Then take those new credentials and update your wp-config.php file. You will want to update the DB_USER and DB_PASSWORD values. This should then resolve your credentials issue. If you need to reset these credentials, contact our support team. If you have followed everything above and are still receiving the “error establishing a database connection” message, proceed to the following troubleshooting steps below.

(Video) How to Fix a Blue Screen of Death on Windows 10 / 11

2. Repair Corrupt WordPress Database

In some cases, it could be that your database has become corrupt. This can occasionally happen (although not very often) as, over time, hundreds of tables are constantly added/removed by new plugins and themes. If you try to login to your WordPress site’s dashboard and are receiving the following error, it means your database is corrupt: “One or more database tables are unavailable. The database may need to be repaired.” It is important to note that you might only see this error on the back-end, whereas you see the “error establishing a database connection” message on the frontend.

WordPress has a database repair mode that you can initiate. Add the following to the bottom of your wp-config.php file.

define('WP_ALLOW_REPAIR', true);
How To Fix The "Error Establishing a Database Connection" in WordPress (16)

Then browse to the following location on your WordPress site: You will then have the option to repair the database or repair and optimize the database. Since you are probably troubleshooting an outage on your site now, we recommend using the repair database option as it is quicker.

How To Fix The "Error Establishing a Database Connection" in WordPress (17)

After running the repair of the database above, ensure that you remove the line of code you added to your wp-config.php file. Otherwise, anyone will be able to access the repair.php page. If you are running cPanel, you can also run a repair from within the MySQL databases screen.

How To Fix The "Error Establishing a Database Connection" in WordPress (18)

Or you could run a repair from within phpMyAdmin. Simply log in to phpMyAdmin, click on your database, and select all the tables. Then from the dropdown, click on “Repair table.” This is essentially just running the REPAIR TABLEcommand.

How To Fix The "Error Establishing a Database Connection" in WordPress (19)

And finally, your other option would be to run the repair using WP-CLIwith the following command:

wp db repair

See more documentation on usage in the WordPress developer resources.

If you want to optimize your database, we have some great tutorials on how to optimize WordPress revisionsfor performance, along with how to convert your MyISAM tables to InnoDB. If you still have issues on your site, proceed to the next troubleshooting step.

Suggested reading: How to Fix the “MySQL Server Has Gone Away” Error in WordPress.

3. Fix Corrupt WordPress Files

The following possible reason you might see the “error establishing a database connection” message is that your WordPress core files have become corrupt. Whether this originated from an issue with transferring files via FTP, a hacker gaining access to your site, or a problem with your host, you can quickly fix this. However, we recommend taking a backup of your site before trying this.

You are going to replace the core version of WordPress on your site. You aren’t touching your plugins, themes, or media, just the WordPress installation itself.

However, you may lose any changes or custom code you’ve added to files such as .htaccess or wp-config.php. If you backed up your website before troubleshooting, you’d have copies of those files that you can restore later.

(Video) Most Common Excel Errors #️⃣ and How To Fix Them - Avoid Broken Formulas

To get started, you must download a fresh WordPress copyfrom

How To Fix The "Error Establishing a Database Connection" in WordPress (20)

Unzip this file on your computer. Inside, you will want to delete the wp-content folder and the wp-config-sample.php file.

How To Fix The "Error Establishing a Database Connection" in WordPress (21)

Then upload the remaining files via SFTP to your site, overwriting your existing files. This will replace all the problematic files and ensure you have fresh ones that are clean and not corrupted. It is recommended to clear your browser cacheafter doing this. Then check your WordPress site to see if the error still exists.

4. Check for Issues With Your Database Server

If nothing above has helped resolve your issue, we highly recommend checking with your hosting provider as it could be an issue with your database server. For example, if there are too many concurrent connections to your database at once, it could generate an error. This is because many hosts limit their servers on how many connections are allowed at once. Utilizing a caching plugin can help minimize the database interactions on your site. If you are a Kinsta client, you don’t need caching plugins, as we have fast server-level caching.

This problem can happen a lot on shared hosts, as someone else could theoretically be affecting your site. This is because shared hosts utilize all the same resources on servers. This is another reason we recommend using a high-performance managed WordPress host, so things aren’t overcrowded. It also means the environment is typically fine-tuned to handle large amounts of traffic, specifically to WordPress sites.

The knowledgeable Kinsta support team is always a click away on the bottom right side of the dashboard and available 24/7 if you need help. And don’t forget we have representatives to assist you in multiple languages, including English, Spanish, French, Italian, and Portuguese.

How To Fix The "Error Establishing a Database Connection" in WordPress (22)

5. Restore Latest Backup

And last but not least, you can always resort to a backup if needed. In some cases, this might be a faster way to resolve the issue if you aren’t worried about losing any data between when your last backup was taken. Many hosts have their own backup restore process. Remember that you might need to restore both your database and your files.

If you are a Kinsta user, you can quickly restore a backup of your site within the Backups section of your site. Choose the time you want to revert and click on “Restore to.” You can then select whether you want to restore to Staging or your Live site.

How To Fix The "Error Establishing a Database Connection" in WordPress (23)

You will then be prompted to confirm the restoration. Enter your site name and click on “OK.” It also creates a backup at the restoration time so you can undo the restoration if needed.

How To Fix The "Error Establishing a Database Connection" in WordPress (24)


As you can see, there are quite a few ways to fix the “error establishing a database connection” in WordPress. The most common being invalid credentials in the wp-config.php file. Checking to ensure those are correct is the best place to start. The last thing you want for a website is to experience downtime.

Hopefully, one of the steps above helped you get your site back up and running. Remember, you can always restore your site from a backup if needed.

Have you experienced the “error establishing a database connection” message on your site? If so, were you able to resolve it? Let us know below in the comments.

(Video) How to Fix Windows 10 Error 0xc000021a

Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Get started with a free trial of our Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.


How do I fix error establishing database connection in WordPress Godaddy? ›

WordPress uses connection strings to know which database to connect to. When your site is not connected to your database, it displays the Error establishing a database connection notification. To resolve this error, update the connection strings on your WordPress site.

What does it mean when it says error establishing a database connection? ›

This error means that your website files (on the webserver) are not able to connect to your database (on the database server). This article lists some common reasons this error could display on your site, including: Incorrect database credentials in your config file. The hostname isn't working.

How do I troubleshoot database connection issues? ›

Tools and methods that help you troubleshoot connectivity issues
  1. Configure firewalls to work with SQL Server. ...
  2. Test connections to SQL Server by using Universal Data Link (UDL) files. ...
  3. Use PortQryUI tool with SQL Server. ...
  4. Check whether SQL Server is listening on dynamic or static ports.
Dec 29, 2022

How do I reset my WordPress database? ›

Reset WordPress With A Plugin
  1. Install and activate the WP Reset plugin. ...
  2. Go to Tools > WP Reset.
  3. Scroll down to the Site Reset section.
  4. Type “'reset” in the Confirmation field.
  5. Click the Reset Site button.
  6. A popup message will appear asking you to confirm that you want to reset your site.
Dec 9, 2021

How do I connect my database to my WordPress site? ›

PhpMyAdmin also allows you to easily import your WordPress database. Simply launch phpMyAdmin and then select your WordPress database. Next, you need to click on the 'Import' link from the top menu. On the next screen, click on the Choose file button and then select your database backup file you downloaded earlier.

How do I check my WordPress database connection? ›

Click on the Hosting on the top menu and then cPanel on the submenu. Find the Files section and click on File Manager. You may get a popup asking you to select the directory you want to start in. Choose the Document Root for option and select the website you want to get the database information for.

How do I fix localhost unable to connect? ›

5 Methods to Solve the Localhost Refused to Connect Error
  1. Temporarily Disable Your Firewall. A firewall is a security system that monitors and filters your traffic, blocking potential threats. ...
  2. Flush Your DNS. ...
  3. Connect with Specified Port. ...
  4. Ensure Apache Is Running. ...
  5. Go Through Browser Settings.
Jan 5, 2023

How do I resolve a WordPress error? ›

Getting started with WordPress error troubleshooting

You can start by clearing your cache. A cache helps your browsers load sites faster by storing data. Clearing it helps you get rid of outdated content, which may be enough to fix your issue. You should also consider updating your theme, plugins, and WordPress core.

Why is my MySQL database not connecting? ›

Here are some reasons the Can't connect to local MySQL server error might occur: mysqld is not running on the local host. Check your operating system's process list to ensure the mysqld process is present. You're running a MySQL server on Windows with many TCP/IP connections to it.

How do I fix SSL certificate error in WordPress? ›

Manually Fixing Mixed Content Errors in WordPress

First, you need to go to Settings » General and make sure that the 'WordPress Address' and 'Site Address' options have HTTPS URLs. If you see URLs starting with 'http', then you need to go ahead and change them to 'https'.

How do I get rid of a connection error? ›

How to fix a “Your connection is not private” error yourself
  1. Reload the page. ...
  2. Consider if you're using public Wi-Fi. ...
  3. Check your computer's date and time. ...
  4. Go incognito. ...
  5. Clear Your browsing data. ...
  6. Check your antivirus software. ...
  7. Update your operating system. ...
  8. Restart your computer.
Aug 15, 2022

How to connect WordPress to MySQL database? ›

To prevent this scenario, you should transfer your website data to a MySQL managed database.
  1. Step 1: Complete the prerequisites.
  2. Step 2: Transfer the WordPress database to your MySQL managed database.
  3. Step 3: Configure WordPress to connect to your MySQL managed database.
  4. Step 4: Complete the next steps.
Dec 20, 2021

How do I enable database connection? ›

Complete the following steps to create a database connection from the home page:
  1. Click the Connections tab .
  2. Click New connection and choose Database from the menu. The New connection window appears.
  3. Choose the database type you want to connect to. ...
  4. Provide the connection properties for your database. ...
  5. Click Add.

What is error establishing a database connection in WordPress AWS? ›

The error "Error establishing a database connection" might occur for the following reasons: There are corrupted database tables. The remote database connection is disabled. The database service is down.

How can I check my database connection? ›

To test the connection to your database, run the telnet hostname port on your Looker server. For example, if you are running MySQL on the default port and your database name is mydb, the command would be telnet mydb 3306 . If the connection is working, you will see something similar to this: Trying 10.10.

What are the causes of database failure? ›

There are many reasons that can cause database failures such as network failure, system crash, natural disasters, carelessness, sabotage(corrupting the data intentionally), software errors, etc.

How do I restore my WordPress site without a database? ›

To restore your website with Google's cache or Bing's cache, follow these steps:
  1. Search for your website or page on Google's or Bing's results page. ...
  2. Click on the arrow. ...
  3. Since we need a cached copy of your website, click on Cache option.
  4. Restore your website, pages or content, or whatever you need from this cached copy.
Sep 20, 2016

How do I manually update my WordPress database? ›

Manually upgrade WordPress using SSH
  1. Navigate to the root directory of your WordPress site. ...
  2. Next, check for WordPress core updates. ...
  3. Update WP version by typing in wp core update . ...
  4. In case you need to update the database as well, you can run the following command: wp core update-db .
  5. And that's it!
Jul 20, 2022

How do I change the database connection in WordPress? ›

Update WordPress database connection details
  1. Step 1 - Open File Manager. Log into the control panel. ...
  2. Step 2 - Open wp-config. php. ...
  3. Step 3 - Locate the login details. Usually, you can find the login details around line 20 in the wp-config file. ...
  4. Step 4 - Update details.

How do I connect my database to my website? ›

Table of Contents:
  1. Create the Virtual Machine.
  2. Install the MySQL Database.
  3. Prepare the MySQL Database.
  4. Replace the Static Website.
  5. Connect the Website to the Database.
  6. Select the Records in the Database.
  7. Insert a Record into the Database.
  8. Update a Record in the Database.
Dec 27, 2021

What is error establishing a database connection in localhost? ›

Error establishing a database connection This either means that the username and password information in your wp-config. php file is incorrect or we can't contact the database server at localhost:3306. This could mean your host's database server is down.

What is the default database for WordPress? ›

WordPress uses a database management system called MySQL, which is open source software. This means you'll sometimes hear your site's database referred to as a “MySQL database.” MySQL is what enables the database to store information and provide you with access to it.

How do I check my localhost connection? ›

Common Uses For Localhost
  1. Open the Run function (Windows key + R) dialog and type cmd. Press Enter. You can also type cmd into the Taskbar Search box and select Command Prompt from the list. Running as Administrator is advised.
  2. Type ping 127.0. 0.1 and press Enter.
Oct 9, 2019

Why would a website refused to connect? ›

There can be a variety of causes, such as incorrect proxy configuration, caching errors, or the web server blocking the proxy and the IP address attached to it. It's also possible that the proxy you're using has gone offline.

How do you check localhost port is working or not? ›

Use the Windows netstat command to identify which applications are using port 8080:
  1. Hold down the Windows key and press the R key to open the Run dialog.
  2. Type “cmd” and click OK in the Run dialog.
  3. Verify the Command Prompt opens.
  4. Type “netstat -a -n -o | find "8080"". A list of processes using port 8080 are displayed.
Dec 2, 2022

Why is my WordPress site not connecting? ›

If you are experiencing problems displaying pages, clearing the browser cache is a good first step to try to resolve the issue. Some situations where you can find it very useful to clear your browser cache: When the page or post editor is not loading or it fails to load.

What is a common issue with WordPress? ›

The WordPress internal server error is often the most common WordPress issue and the most confusing too. This error message typically shows up when something is wrong, but the server doesn't know where the problem is.

How do I check my WordPress site issues? ›

Just log in to the hosting dashboard, then go to Sites > Tools > WordPress debugging and click Enable. You can then look around your site to find the cause of the issue or check the log.

How do I connect my MySQL database to my website? ›

  1. Create Database.
  2. Create a Folder in htdocs.
  3. Create Database Connection File In PHP.
  4. Create new php file to check your database connection.
  5. Run it.
Dec 7, 2021

How do I establish a connection in MySQL? ›

Establishing a Connection to MySQL
  1. In the Server name box, enter the MySQL server name. In the Server port box, enter the port number to be 3306. It is the default port.
  2. In the User name box, enter a MySQL account that has the necessary permissions.
  3. In the Password box, enter the password for the specified user name.

How do I establish a connection to a MySQL server? ›

To connect to MySQL Server:
  1. Locate the MySQL Command-Line Client. ...
  2. Run the client. ...
  3. Enter your password. ...
  4. Get a list of databases. ...
  5. Create a database. ...
  6. Select the database you want to use. ...
  7. Create a table and insert data. ...
  8. Finish working with the MySQL Command-Line Client.
Mar 1, 2021

Why do I keep getting SSL connection error? ›

If you're surfing the net and an SSL error occurs on a website you're trying to visit, your browser will warn you by showing you an error messages or signal. This error is mostly caused by an expired or bad SSL certificate. It also occurs when the browser can't verify the legitimacy of a website's SSL certificate.

How do I get rid of SSL certificate error? ›

In that case, you should:
  1. Adjust your local time and date settings (check the Google Chrome section above for instructions).
  2. Clear your browser's cache and cookies.
  3. Clear your OS's SSL slate or delete any local certificates for Gmail.
Oct 13, 2022

How can I bypass SSL certificate error? ›

How to Fix SSL Certificate Error
  1. Diagnose the problem with an online tool.
  2. Install an intermediate certificate on your web server.
  3. Generate a new Certificate Signing Request.
  4. Upgrade to a dedicated IP address.
  5. Get a wildcard SSL certificate.
  6. Change all URLS to HTTPS.
  7. Renew your SSL certificate.
Nov 18, 2021

Do you need MySQL for WordPress? ›

MySQL uses Structured Query Language (SQL), a popular language for databases. MySQL works best with other open-source applications like WordPress, Apache web server, the Linux operating system and PHP. Before you can install the WordPress software, you first need to have a MySQL database.

How do I connect my WordPress database to localhost? ›

Navigate to http://localhost/phpmyadmin. Where it says create new database, choose a name for your database. Next, open up wp-config. php in the root of your wordpress folder, and update the four values shown below to reflect your new database.

Does WordPress work with MySQL? ›

WordPress uses MySQL as its management system. MySQL uses the Structured Query Language to create, read, update, and delete data from a database. While most MySQL queries run automatically, users can also perform them manually to change WordPress URLs and carry out other tasks.

How do I make my database active? ›

Database administrators can use the ACTIVATE DATABASE command to start the selected databases. This eliminates any application time spent on database initialization. The ACTIVATE DATABASE command is the only way to explicitly activate a database.

How to connect database to server? ›

Connect to a SQL Server instance

Start SQL Server Management Studio. The first time you run SSMS, the Connect to Server window opens. If it doesn't open, you can open it manually by selecting Object Explorer > Connect > Database Engine. For Server type, select Database Engine (usually the default option).

Where is the database connection file? ›

Database connection files

When you create the connection in the Catalog tree, the file is created in \\<computer_name>\Users\<user_name>\AppData\Roaming\ESRI\Desktop<release#>\ArcCatalog, but you can move the connection file to another location.

Why is my WordPress not installing? ›

The major causes of installation problems are: incorrect editing of the wp-config file database details. uploading WordPress to the wrong location on your server. using a web server that doesn't support standard WordPress hosting requirements.

How do I fix error establishing a database connection on WordPress on Digitalocean? ›

How to Fix the “Error Establishing a Database Connection” in WordPress
  1. Why Does WordPress Database Error Occur?
  2. Determine Error Establishing a Database Connection.
  3. Check Database Login Credentials in wp-config.
  4. Reset Username and Password.
  5. Database Host Value.

Why am I getting a WordPress error? ›

There are 4 main types of errors on WordPress: HTTP, PHP, MySQL and JavaScript errors. These errors can be due to an incompatibility between plugins, a corrupted file, a server or memory problem, etc. Some of the famous errors include the 500 error, White Screen of Death and database connection error.

How do I resolve a WordPress issue? ›

In this beginner's guide, we will show you how to troubleshoot WordPress errors, step by step.
  1. Research Your Error Message. ...
  2. Create a Complete Backup of Your WordPress Site. ...
  3. Clear Browser Cache. ...
  4. Clear Your WordPress Cache. ...
  5. Deactivate All Plugins Installed on Your Website. ...
  6. Switch to a Default WordPress Theme. ...
  7. Refresh Permalinks.
Jul 1, 2022

How do I connect my database to WordPress? ›

First, you need to launch the phpMyAdmin from your hosting account's cPanel dashboard. After that, you need to select your WordPress database. PhpMyAdmin will show your WordPress database tables. You need to click on the 'Browse' link next to wp_users table.

How do I fill the database connection details in WordPress? ›

Update WordPress database connection details
  1. Step 1 - Open File Manager. Log into the control panel. ...
  2. Step 2 - Open wp-config. php. ...
  3. Step 3 - Locate the login details. Usually, you can find the login details around line 20 in the wp-config file. ...
  4. Step 4 - Update details.

What database is my WordPress connected to? ›

You can confirm this information from your WordPress hosting account dashboard. Simply log in to your hosting account and click on MySQL databases under the database section.

How do I manually clean my WordPress database? ›

How to optimize your WordPress database
  1. Reduce the number of saved revisions. By default, WordPress saves revisions of your posts and pages. ...
  2. Prevent spam comments. ...
  3. Regularly empty your WordPress trash. ...
  4. Delete unused plugins and themes. ...
  5. Disable pingbacks and trackbacks. ...
  6. Delete unused media files.
Dec 7, 2022


1. How to Fix Roblox Error Code 529
(How Tech To)
2. Cronus Zen Error 3002 and how to fix it
(Fitness and Gaming)
3. How to Fix Error Code 268 Roblox - Fix Roblox Error Code 268
(Gauging Gadgets)
4. How To Fix: File System Error (-2147219196) on Microsoft Photos on Windows 10
5. How to FIX SPILL Error in Excel - WHY it's NOT ALWAYS Obvious!
(Leila Gharani)
6. How to Fix PC Errors in Windows
Top Articles
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated: 11/15/2022

Views: 6147

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.