Security – Bloggingtips.com https://bloggingtips.com Start, Grow, and Monetize a Blog Wed, 28 Sep 2022 12:33:35 +0000 en-US hourly 1 How to Fix the ‘Your Connection Is Not Private’ Error https://bloggingtips.com/how-to-fix-your-connection-is-not-private-error/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-fix-your-connection-is-not-private-error https://bloggingtips.com/how-to-fix-your-connection-is-not-private-error/#respond Fri, 24 Jun 2022 04:52:56 +0000 https://bloggingtips.com/?post_type=tutorials&p=90618 Read more]]> It might sound like a line from a 90s hacker movie or worst, as a security nightmare, but most of the time when you see the ‘Your connection is not private’ message it’s probably not such a big deal.

While online security is not a laughing matter and being careful on the net is always the prudent choice, this error is, thankfully, quite easy to resolve most of the time.

Stick around while we explain what the ‘Your connection is not private’ error means, as well as the various ways to fix it.

What the Error Is

The first thing to know is that this error happens with all sites that use the HTTPS connection.

As opposed to the regular HTTP, this type of connection has security certificates that are installed and verified when you visit a webpage.

Your browser does the verification, and if the site doesn’t pass, the browser won’t load the page in question – you’ll get the error message instead.

Fixing the Error

The error might appear either due to some issue with your device or a real problem concerning the site you’re trying to reach.

Here are the possible problems and solutions, going from less to more complicated.

Reload the Page

Both the server and your computer can bug out temporarily, and that can be enough to cause not only this error but several others.

Your first step should always be to try and reload the page − it might be as simple as that.

Deal with Public Wi-Fi

If you’re on a public network, like a mall, café, or airport Wi-Fi, that your connection may not be set up properly on their part.

With public Wi-Fi connections, there’s often a log-in page for the portal that will pop up once you try to reach a website.

Connecting to an otherwise secure site before registering with the portal page will often result in a ‘Your connection is not private’ message.

To fix this, simply navigate to a site that doesn’t run an HTTPS connection, such as http://www.example.com/ – we’ll explain what this means later.

The portal page will open so you can log in.

Once you do that, the error message will most likely not appear again, whatever site you go to.

Although you might resolve this particular issue with the method described above, if you use public Wi-Fi often it might be a good idea to get your hands on a VPN.

Check the Time

A less obvious but quite common reason for this error can be that the clock on your device isn’t set to the correct time.

Your browser uses the time on your device to sync with the server – if that doesn’t match, the security certificate won’t go through.

This problem can occur especially with new devices since they don’t always sync the clock automatically.

To get the clock on your device up-to-date, find the Date and Time settings, and toggle the automatic setting.

Restart your browser and go to the page you were trying to reach before.

Go Incognito

Open an incognito window in your browser to see if that’ll take you to the desired site.

This is more of a diagnostic method since, if it works, that means you need to clear your browser’s cache.

Another way you could check if the cache is the problem would be to try connecting through a different browser – again, if it works it’s cleaning time.

However, besides clearing the cache, you might need to clear the SSL state in your browser.

This means you should remove all security certificates, but only for now.

When you revisit any page, a fresh SSL will be reinstalled and you’ll be able to go about your business.

Get Your DNS in Order

It might be the case your Domain Name System (DNS) is set to something other than the default, and that has been known to result in the ‘Your connection is not private’ error.

To fix this, go to your network properties and make sure your device is set up to obtain the DNS address automatically.

Disable Protection

If you have an antivirus or a VPN running (as you should), those programs could clash with your connection settings and even some security certificates.

To find out if this is the cause of the problem, disable them temporarily and reload the page you wanted to access.

Note that you should keep your protective software disabled only when browsing trusted sites!

If your antivirus is blocking a page that you don’t know if it’s safe, maybe there’s a good reason for it.

Restart

Contrary to how the previous methods were laid out, we’ve saved this fairly simple one for last just because it’s your last resort if nothing else works.

Straightforward, common, and oftentimes surprisingly effective, the humble restart option is known to resolve many a problem.

Sure, it’ll take you away from whatever you were doing, and, depending on your device, it might take some time, but if everything else fails – give the good old restart a try. It might just save you a headache!

Taking Care of the Job

If you see the ‘Your connection is not private’ message, know that there’s no need to panic.

Having found out what’s going on and the methods to fix it, you’ll most likely be able to resolve the problem on your own.

]]>
https://bloggingtips.com/how-to-fix-your-connection-is-not-private-error/feed/ 0
12 WordPress Bug Fixes For Common Problems In 2022 https://bloggingtips.com/wordpress-bug-fixes/?utm_source=rss&utm_medium=rss&utm_campaign=wordpress-bug-fixes https://bloggingtips.com/wordpress-bug-fixes/#respond Fri, 10 Jun 2022 22:26:24 +0000 https://bloggingtips.com/?post_type=tutorials&p=89873 Read more]]> WordPress is a massive platform for website creation, with over 20 billion web pages existing thanks to the service.

As one of the top self-hosting web page solutions, WordPress has plenty of users building out their businesses and portfolios.

But, what happens if there’s a bug or error with WordPress?

Let’s take a look at the common WordPress bug fixes.

With these tips, new and veteran WordPress users can solve these issues in no time.

What Are Common WordPress Bugs?

With how many folks use WordPress, plenty of WordPress bugs come up.

Let’s take a look at the common WordPress error messages and bugs.

vector graphic showing an illustration of wordpress bug fixes - a person standing in front of a computer with error messages all over it

1. Internal Server Error

Also called 500 error codes, internal server errors broadly relate to server issues.

What It Is

An internal server error refers to an issue handled on the server-side.

The causes for these errors can be a wide range of things, requiring multiple steps to find and solve.

How to Fix It

Expect some troubleshooting to solve an internal server error.

Typically, you’ll want to activate debugging mode and start turning off plugins to find the source of the issue.

There can also be issues related to the .htaccess file or with memory usage, requiring technical know-how to solve the issue.

2. Technical Difficulties

When a WordPress site displays a Technical Difficulties error message, there isn’t much info to work with.

What It Is

This error message displays when there is a fatal error within WordPress requiring access to the logs for the website to fix.

How to Fix It

To access the logs for the website, you need to be able to log into WordPress using an admin email.

An easy way to check if the email you use to log in has admin privileges is to check your email and see if you can receive notification emails from WordPress.

3. Syntax Error

Unlike the previous fatal errors listed above, a syntax error will have a more clear answer to its issues.

What It Is

Syntax errors are reported issues with the website’s code structure.

Usually, a syntax error comes about from custom code or a new WordPress plugin not running the way it was designed.

How to Fix It

The easiest way to fix a syntax error is to remove the custom code or plugin and double-check the code for errors.

If the problem is new, you can also revert the website or plugin to a previous version using backup data.

4. 404 Error

One of the more common errors users see is the 404 error code.

What It Is

A 404 error is a subset of the 400 error codes that all refer to HTTPS errors on the client-side.

Specifically, 404 errors refer to the web browser not finding a website at the listed URL.

How to Fix It

As client-side errors, 404 errors have to get fixed on the user end rather than the hosting side. Double-check the URL for any typos or mistakes in the domain name.

If users report a 404 error for one page of your site, go into the WordPress admin tools and ensure that the web page in question is published.

Sometimes pages can get hidden or deactivated by accident, resulting in these 404 error issues.

5. Memory Exhausted Error

Like a computer, websites use a certain amount of memory to run.

What It Is

Memory exhausted errors refer to the website trying to use more PHP memory than they have allocated.

How to Fix It

To fix this WordPress issue, you’ll have to go into the wp-config.php file using an FTP (File transfer protocol) application to change the memory allowance.

Near the bottom of the file, you’ll want to change the line starting with “define(‘WP-MEMORY-LIMIT)” to the new memory value, usually 256MB.

6. RSS Feed Error

RSS feeds refer to Really Simple Syndication feeds.

RSS feeds get used to stay up-to-date on their favorite websites and see plenty of use on the WordPress website.

What It Is

An RSS feed error causes update information to not be properly sent to a user’s RSS feed, resulting in a loss of notification from the website.

How to Fix It

When setting up the RSS feed plugin for your website, ensure that the grammar for the plugin is correct. RSS feeds use XML, a coding language known for being very finicky with its syntax.

Also, you can disable the RSS plugin for your website if you decide to remove that functionality.

This process is done from the WordPress dashboard for your website.

6. Unavailable for Scheduled Maintenance

While maintenance isn’t the most exciting process, it’s a required part of keeping your website running.

vector graphic showing a laptop screen with the briefly unavailable for scheduled maintenance error message on the screen

What It Is

WordPress has to perform maintenance on its servers sometimes to provide its web-hosting service.

This notification pops up when your site is down due to maintenance on WordPress’s end.

You’ll see a screen that says “Briefly unavailable for scheduled maintenance“.

How to Fix It

There is no bug fix for this because this isn’t an error. Instead, this page pops up when WordPress goes down for maintenance.

The only solution for this issue is to wait for the scheduled maintenance to finish.

Usually, WordPress doesn’t stop its web hosting services out of nowhere.

Double-check that you have notification emails from WordPress services enabled to receive a heads-up about when maintenance comes around.

7. WordPress White Screen of Death

One of the worst errors you can receive is the white screen of death.

This screen prevents people from accessing your website.

What It Is

This error comes up when there is a critical issue with the rendering of your website.

In general, the issue is caused by a plugin or WordPress theme.

How to Fix It

If you added a new theme or plugin to your website, removing that addition should revert your website to something that can be rendered.

Reverting to a previous version after an automatic update can help as well.

8. Sidebar Below Content Error

Sidebar ads and notifications belong on the side of the content, but an error can cause them to appear under the content instead.

What It Is

This error is a problem with the formatting of the web page caused either by bad syntax in the sidebar or improper formatting from the WordPress theme enabled on the page.

How to Fix It

This error is one of the common WordPress issues for folks monetizing their website.

To fix this issue, check the HTML and CSS code to ensure that you closed all the <div> tags and that the proper pixel width for the ad is set.

9. WordPress Keeps Logging Out

This WordPress error keeps you from staying logged into your account for an extended period, interrupting workflow.

What It Is

WordPress uses cookies to authenticate users when they log in.

If the cookie holds URL data that doesn’t match the URL you want to log in from, the website logs you out after a few moments.

This feature prevents someone from messing with the website.

How to Fix It

Go into your General Setting through the WordPress dashboard and ensure that the WordPress Address and Site Address URL fields match.

This method ensures that the URL matches all cookies generated by the website regardless of which field it pulls the data from.

10. Common WordPress Image Issues

Images are an important part of designing a website, meaning that issues with this media can be frustrating.

What It Is

WordPress has tools built into its dashboard to make uploading and adding images simple.

However, for newer users, these tools can be confusing or unintuitive, causing images to render in odd ways.

How to Fix It

Most common WordPress image issues come down to not knowing how to edit images inside of WordPress.

WordPress has loads of support pages about images, all dedicated to explaining the various issues images can have on the platform.

Search those pages for your image issues and read up on how the editing tools can fix the trouble.

Why Is WordPress So Slow Today?

One of the largest contributors to a high bounce rate for your website is slow loading times.

To fix these long periods of waiting, take a look at some of these tips:

1. Slow or Poor Quality Hosting

WordPress is a default website option for most web hosting services.

But, not all hosting options are equal.

Some web hosts don’t offer the same level of maintenance or hardware updates that faster hosts go through to offer high speeds.

Without these measures, your website operates on a slower server, increasing the time it takes for pages to load.

The best way to solve this problem is to prevent it in the first place.

When researching web hosts, look into their average response times for their servers using various ping tests.

The higher the ping, the slower the servers are to send data back.

You can also look to migrate your website to another host.

But this requires access to the FTP files for the website and some technical know-how to transfer those files to the workers setting your site up on the new servers.

[box_with_button title=”Pro Tip:” link_url=”https://bloggingtips.com/best-managed-wordpress-hosting/” link_text=”The Best Managed WordPress Hosting”]

If your website is running slow, you’re likely facing resource limits or simply the limits of what your shared host defines as reasonable. We suggest checking out managed WordPress hosting, which is optimized specifically to make your site run quickly.

[/box_with_button]

2. No Caching or Caching Plugins

The next best way to speed up your website is to use a caching plugin.

Caching refers to a technical process where data stays tucked away in a storage layer for later use.

The process is best for data that needs to be accessed time and time again to reduce load times.

A caching plugin collects data from static web pages and stores that data ahead of time for users.

When a user goes to the website, the caching plugin releases that data faster than if the user tried to connect to the FTP files working in the foundation of the website.

Caching plugins can be highly technical.

So review how caching works and what you want to be cached on your website before going crazy with these tools!

3. No CDN

A Content Delivery Network (CDN) refers to a content distribution system that stores the cached version of your website and sends it across several servers.

From there, when a user tries to access the website, they connect to the server located the closest to them instead of wherever the web hosting server is situated.

The main goal of shortening the physical distance between user and server is speed.

Faster loading speed means users can get to the content faster, reducing the chance they bounce off the website.  

Unlike the other speed solutions listed here, CDNs are easy to set up.

Adding a CDN plugin to your website generally involves a few minutes of setting up an account and adding the plugin through the dashboard.

WordPress Bug Fixes

With errors and slow pages covered, let’s talk about WordPress bug fixes and tips.

vector graphic showing an illustration of two people in action with doing wordpress development sitting at their computers

1. Hire an Expert

Not every person that sets up a WordPress website is an HTTP master.

For the folks out there setting up a website for their business and needing some help, a WordPress expert can help solve troubles.

Don’t hesitate to rely on one of these experienced pros if needed!

They’re cheaper than you’d expect and the time savings alone is worth every penny.

2. Clear Cache

If you use a caching plugin, clearing the cache can help your website.

What This Can Fix

Clearing the cache on WordPress can speed up your website after major changes and prevent loading issues.

It also helps you see the changes you apply to the website faster.

How To Do It

Without a caching plugin, you have to go into the FTP and SSL files and remove the cache manually from the website’s folder.

This route requires some coding knowledge, so it’s not recommended you try this without some coding experience.

Otherwise, you can use a caching plugin to clear your cache.

Most caching plugins have this option in their settings, which you can access through the WordPress dashboard.

3. Reset Site

Resetting your site means starting over, but that might be a good thing.

What This Can Fix

If your website needs a total overhaul or has been hacked, resetting the website can give you a clean slate to work with without any leftover caching or setting files.

How To Do It

Much like clearing your cache, resetting your website is possible with and without a plugin.

A plugin does much of the coding and database clearing needed to create the blank slate.

So, unless you have experience with databases and web file removal, stick with a plugin or an expert.

Check .htaccess File

Reviewing your .htaccess file can tell you a lot about what permissions and rules are on your website.

What This Can Fix

The .htaccess file for your WordPress site holds the data needed for permissions and restrictions regarding:

  • Web hosting
  • Logins
  • Similar connections

Issues with these parts of your site could mean something needs to be changed in this file.

How To Do It

Any edits to the file should be done only after you create a backup of your website.

Mistakes made inside the .htaccess file can hurt your website if you aren’t careful.

From there, a plugin or an FTP file viewer can give you access to the file.

Browse through the file to find the line of code related to your problem.

4. Switch to Default Theme

Themes on WordPress can make your site look appealing but also cause trouble.

What This Can Fix

If a theme isn’t working for your website due to resource hogging or security issues, switching to the default theme ensures your website will work.

How To Do It

In the WordPress dashboard, navigate to your Themes option.

Choose the Default Theme option and save the changes.

As a warning, it can take a minute or two for your website to update to the default theme.

5. Increase Memory Limit

The PHP memory limit represents how much can run in the background for your website.

What This Can Fix

Increasing the memory limit for your site allows more plugins and similar resources to operate in the background.

How To Do It

Changing the memory limit requires an FTP file viewer to access the correct file.

Once there, you’ll find the memory limit parameter towards the bottom of the text file.

Change the memory limit to a value a little higher than your top-end usage to ensure you don’t freeze up the website.

6. Deactivate Plugins

While many WordPress plugins improve the performance and capabilities of your website, some aren’t worth the headache they cause.

What This Can Fix

Deactivating plugins can reduce the number of ways hackers can try to enter your website, especially if the plugins are old.

How To Do It

Go to your Plugins settings in the WordPress dashboard.

For every plugin you no longer want, click the deactivate button.

Save the changes by choosing the Apply option just above where the plugins are listed.

Wrapping Up

For WordPress bug fixes, you have to know what error you’re dealing with and have some technical knowledge to poke around in your website’s files.

Plugins can make these tasks easier or contribute to the problem depending on how well the plugins are made.

Overall, it’s best to leave the troubleshooting to the folks that understand the code operating WordPress.

Understanding these error codes can help you tell a WordPress expert where you think the issue is, helping to resolve the issue faster.

]]>
https://bloggingtips.com/wordpress-bug-fixes/feed/ 0
How To Fix The “Err_Too_Many_Redirects” Error https://bloggingtips.com/err_too_many_redirects/?utm_source=rss&utm_medium=rss&utm_campaign=err_too_many_redirects https://bloggingtips.com/err_too_many_redirects/#respond Fri, 10 Jun 2022 21:38:31 +0000 https://bloggingtips.com/?post_type=tutorials&p=89866 Read more]]> If you’ve been on the internet for a while, you’ve probably encountered the err_too_many_redirects error message.

It can be annoying to deal with as site owners and visitors, especially when it won’t go away.

Keep reading to find out everything you need to know about this error message.

What Does the err_too_many_redirects Mean?

The err_too_many_redirects error message occurs when your browser repeatedly sends you to another URL which sends you back to the first URL you searched for originally.

Your browser can’t form a connection between the destination page and the page you’re starting from.

How Does err_too_many_redirects Look Like on Different Browsers?

The error looks different on different browsers.

Here is what it looks like on three of the most popular web browsers.

1. Firefox

The Firefox web browser notifies you that your page isn’t redirecting properly.

Below this page, you’ll see text that tells you that the browser is redirecting the address for this request in a way that will never be complete.

Below that, it tells you the issue may be caused by cookies.

2. Google Chrome

The Google Chrome browser gives you a message that your page is not working.

Underneath “This Page Isn’t Working”, you’ll see the URL of the page you’re trying to visit and notice that the page has redirected you too many times.

Below that, you’ll see some advice to try clearing your cookies.

Finally, at the bottom of the page, you’ll see text that says, “Err_Too_Many_Redirects”.

3. Safari

The Safari web browser displays a notice that says Safari can’t open the page.

Below this, a notice will state that too many redirects occurred trying to open the URL.

Safari then explains what caused the error.

Why Does err_too_many_redirects Error Occur?

When you face the err_too_many_redirects error, you may be confused.

Here is what causes this problem.

When you use a redirect link that links to another redirect link, it can lead to a redirect loop error which overwhelms your website and causes it to crash.

What are HTTP Redirects?

An HTTP redirect is used to send search engines and people who visit your website to a different URL.

To reduce your risk of the err too many redirects error, avoid linking multiple redirect notices to each other.

Why are Redirects Used?

There are several reasons why a redirect is used.

Here are some of the most popular reasons.

Moving Page to a New Host

If there is a situation where you need to move all your website pages to a new host, then you can use a redirect to send the people who visit your website to your new domain.

Deleting Pages

Sometimes you’ll need to delete a page from your website with SEO value.

After you delete your webpage, you should use a 301 redirect to send your website’s visitors to the page that’s most relevant to the page that they’re searching.

Merging Websites

In cases where two or more websites are merging, redirects redirect visitors from one website to another.

How To Find a Redirect Loop

Finding a redirect loop is not a difficult process.

You can use an online redirection checker to check if your website has any redirect errors.

Here are the steps to do it.

  1. Find a URL Checker tool. Some popular options are Pulno, Redirect Checker, and Kinsta.
  2. These tools will scan your site and give the amount and types of redirects listed there.

How To Solve err_too_many_redirects

There are several methods to solve the err_too_many_redirects error.

Try these methods to solve the redirect loop error.

Clear Browser Cache and Cookies and Refresh

Many browsers suggest the redirect error is due to an issue with cookies and that clearing your cookies can help.

Clearing your browser cache is helpful whether you’re the site’s owner or just visiting.

Here is how to clear browsing data based on your web browser.

Firefox

  1. First, you should select the menu button and click the settings option.
  2. Click the Privacy And Security Panel.
  3. You’ll see an option that says Cookies and Site Data, go to that option and click, Clear site data.
  4. Select the clear option.
  5. Refresh the page.

Google Chrome

  1. Open the Google Chrome Browser.
  2. Press the CTRl+ Shift + Delete buttons. Doing so will open the Clear Browsing Data window.
  3. You’ll see a time range window. Select the All-Time option.
  4. Select the options that say Cookies and Cached images option.  Don’t select the browsing data option.
  5. Select the Clear Data option.
  6. Refresh the page.

Safari

  1. Open the Safari browser.
  2. In the top left-hand corner, click on Safari.
  3. In the drop-down menu, select Preferences.
  4. When the window opens, click the Advanced tab.
  5. At the bottom, check the box labeled, Show Develop Menu in Menu Bar.
  6. Exit out of the Preferences window. In the bar menu at the top, you should see Develop now. Click on it.
  7. From the drop-down menu, select Empty Caches to clear cache.
  8. Reload the webpage.

Clear the WordPress Cache

The err too many redirects error could be related to an issue with a WordPress caching plugin you’re using.

The way to solve this issue is by clearing the WordPress cache.

There are several different WordPress caching plugins that you could be using, so we can’t give you a universal guide, but if you google the name of the WordPress plugin that you’re using you will find the information you need.

Check URL Settings

The cause of your redirect loop could be a misconfiguration.

You solve this issue by going into your URL settings and ensuring your WordPress address matches your site’s URL.

You should also ensure that neither of the URLs has no white space, and they don’t have “www.” in them.

You should be able to access your URL settings from the control panel, but if you can’t, here are some steps to access them through the wp-config file.

  1. Go to the File Manager, also known as the FTP client.
  2. Find the folder with your WordPress files and open it
  3. Look for the file called wp-config.php, and right-click the Edit URL option
  4. Add lines of code that say Define ‘WP_HOME’ and ‘WP_SITEURL’ and type your URL. Make sure it’s the same for both options.
  5. Save your file
  6. You’ll receive a prompt to upload the modified file. Select yes.
  7. Refresh the site

Change Security

The cause for your redirect error could be your security protocol (Your SSL certificate).

The way to solve this issue is by switching to a default protocol.

If this doesn’t solve your issue, the next step is ensuring your SSL certificate is set up properly.

Installing an SSL certificate will vary based on the web host you’re using, so you need to google the steps for your host.

Redefine .htaccess

You should always verify your htaccess file whenever you encounter an issue with your WordPress website.

As a part of your Apache server settings, it controls your page redirects.

Here are the verification steps.

  1. Locate your WordPress site files in the FTP client
  2. Find the folder with your WordPress website files
  3. Find the htaccess file
  4. Right-click, then select the open original version of the file for editing.
  5. Erase the content in the htaccess file, then reset the settings to their defaults.
  6. Save your changes, then upload your default file to your web server.
  7. Refresh the website.

Check Plugins

Your redirect issue could be due to the WordPress plugins you’re currently using.

Plugins are the cause of several WordPress errors.

Try disabling any redirect plugins that you have installed.

If you don’t have any redirect plugins installed, you need to manually disable all of your plugins.

Here are the steps to check if you need to go through this process.

  1. Disable all the WordPress plugins you have currently installed
  2. Refresh the page. Remember to back up the original file.
  3. If the error is still there, the problem was not caused by the plugins.

The err_too_many_redirects error can prevent you from gaining access to your WordPress admin dashboard.

To manually disable all your plugins if that occurs, follow these steps.

  1. Locate the plugins folder. It is normally located in the wp-content folder.
  2. Remove or rename all your folders

If none of these steps solves your problem, try enabling PHP error_reporting to look deeper into the issue.

Figure Out the Nature of a Redirect Loop

There are several different types of redirect loops.

Figuring out the type of redirect loop you’re dealing with can help you figure out the best way to solve the issue.

These are the most common types of redirects.

301 Redirect

A 301 redirects error means that the content from one website has permanently moved to another location.

302 Redirect

A 302 redirects error means that the content from one website has temporarily moved to another location.

Final Notes

Redirection code can be a useful SEO tool but, if used incorrectly, it can cause issues on your website.

Ensure your redirection codes are properly written and quickly solve any redirection errors on your site.

]]>
https://bloggingtips.com/err_too_many_redirects/feed/ 0
How To Fix The “Error Establishing A Database Connection” Error In 2022 https://bloggingtips.com/error-establishing-a-database-connection/?utm_source=rss&utm_medium=rss&utm_campaign=error-establishing-a-database-connection https://bloggingtips.com/error-establishing-a-database-connection/#respond Fri, 10 Jun 2022 14:17:34 +0000 https://bloggingtips.com/?post_type=tutorials&p=89852 Read more]]> You just spent days, or possibly weeks, developing your WordPress website.

Now, it’s out in the world for all to see. You’re getting traffic, generating leads, and hopefully, getting a few clicks.

Then, one day, you see that fatal white screen informing you of an error establishing a database connection.

It may not be the White Screen of Death, but it’s pretty close to it.

But don’t panic just yet.

Fortunately, there are several things you can try to get your WordPress site back online.

So, if you’re ready to try your hand at a bit of troubleshooting, you’ve come to the right place.

Let’s dig in.

What Is the “Error Establishing a Database Connection” in WordPress?

An error establishing a database connection is just that—an error connecting to WordPress’ database.

When that happens, your entire website becomes inaccessible to your users.

Not only that, but you won’t be able to access your WordPress dashboard, either.

So now, the front end of your WordPress site is unavailable to your users, and you might not be able to get into your account to fix it.

Many web hosts give you a bit of a buffer to fix this issue.

Some web host providers run websites from the cache.

If your site’s cached, the server can continue to run it as long as it’s in the cache.

For example, Kinsta WordPress sites are cached for one hour by default.

This gives you a one-hour buffer to find and address the issue.

Bear in mind that not all problems can be fixed in one hour.

However, sometimes the error is a simple fix, so site monitoring is essential.

Why Does WordPress Need a Database?

WordPress requires two things to allow your website to function: a programming language and a database.

The programming language is PHP, and the database is MySQL.

Your site’s content, including widgets, settings, content, and metadata, is stored on WordPress’s MySQL server.

When a user visits your site, WordPress reaches out to the database, retrieves all of your site’s information, and displays it to the user.

What Causes “Error Establishing a Database Connection”?

If WordPress can’t connect to its database host for some reason, all you and the user will see is a white screen with an error message.

Your site’s content will be absent because WordPress can’t access any of it.

There are a few things that can cause errors accessing the database.

For example, your login information could be incorrect, there could be an issue with the server itself, or you might have corrupt files on your database or WordPress.

In other words, the issue could be on your end, or it could be the database server itself.

We’ll get into each of the ways you can troubleshoot in the next section.

5 Ways To Fix the Error Establishing a Database Connection in WordPress

Unfortunately, fixing the WordPress database connection error might be out of your hands in some cases.

If your web hosting provider or WordPress is down for whatever reason, you’ll need to wait until they resolve the problem on the back end before you can attempt any fixes on your end.

The good thing about it being out of your hands is that you won’t have to spend hours fixing the problem.

However, you can try a few things if you know the issue is on your end.

vector graphic showing a laptop with the "error establishing a database connection" error message on the screen

Before You Start

There are two things you should do before you start messing with your WordPress site or your credentials.

First, make a backup of your site if you haven’t already.

A best practice is to back up your WordPress site each time you make a change.

If you haven’t gotten into that habit, now is a great time to do so.

Second, reach out to WordPress before you touch anything.

A customer support representative will be able to tell you if the database connection message is due to difficulties on WordPress’ side.

If WordPress has assured you the problem is due to something on your end, you can try the following fixes.

1. Check Your Database Login Credentials

The first thing to try is checking your WordPress database login credentials.

It’s rare to have an actual database error, so the most likely cause is an incorrect database username or password.

A forgotten username or password is especially common after users switch to a new host.

Try to remember if you recently changed your username or password.

If so, that’s probably the cause of the database connection error.

If you’re a new user, it’s more likely the problem is incorrect database credentials.

However, if the “error establishing a database connection” message isn’t a result of an incorrect database username or password, you can move on to the following troubleshooting method.

Where Can I Find My Database Credentials?

Your database login credentials are in your wp.config.php file in your WordPress site’s root folder.

You’ll find the wp.config file in your Bluehost cPanel account in the file manager.

Right-click on the file and select “Edit.”

Here, you’ll find the following pieces of information about your MySQL database:

  • Database name
  • Database username
  • Database password
  • Host name

It’ll look something like this:

<!-- wp:paragraph -->
<p>( 'DB_NAME', 'database_name_here' );</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>( 'DB_USER', 'username_here' );</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>( 'DB_PASSWORD', 'password_here' );</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>( 'DB_HOST', 'localhost' );</p>
<!-- /wp:paragraph -->

Look over all of the information and make sure it’s correct.

Then, make the necessary changes to your MySQL database information.

2. Repairing Corrupt Database

If your database login credentials were accurate, your next step to fixing a WordPress error establishing a database connection is to see if the problem is a corrupt database.

A WordPress site has many moving parts, most of which are in the WordPress database.

When one of those moving parts goes a bit off the rails, you might run into an issue.

First, head to your WordPress dashboard at yoursite.com/wp-admin.

If you see an error that says, “one or more database tables are unavailable.

The database may need to be repaired,” then the issue is a corrupt database.

If you see the “one or more database tables” error, you’ll need to head back to your wp-config file and do the following:

  1. Right-click on the file and click “Edit.”
  2. Scroll to the bottom and add define(‘WP_ALLOW_REPAIR’, true); to the bottom of your file.
  3. Upload the file back to your wp-config folder.
  4. Go to yoursite.com/wp-admin/maint/repair.php and click either of the buttons.
  5. Once WordPress runs the automatic repair, check if the error is still present.

If the error is gone, return to your wp-config file and remove the line of text you just added.

However, if the error is still there, you can move on to the next potential fix.

3. Fixing Corrupt Files

Anyone who’s used a computer has likely come across corrupted files.

File corruption usually happens when files are transferred from one place to another.

However, a hacker accessing your files could have the same outcome.

Fixing corrupt files will require doing a new WordPress installation.

  1. Download a new copy of WordPress from WordPress.org.
  2. Unzip the file.
  3. Delete the wp-content folder and wp-config-sample.php file.
  4. Upload the rest of the files to your site.

This upload will overwrite all the files currently on your site.

Ideally, it’ll replace any corrupt files and fix the issue.

4. Issues With Your Database Server

After going through the previous three troubleshooting attempts, your next step is to see if there are issues with your database server.

Your database server is the machine your web host uses to run your database.

Server issues could arise due to too many connections or attempted connections, especially if you’re using a shared host.

Reach out to your host’s customer support team to see if they can give you any information.

5. Restore Latest Backup

Finally, you can restore your site using your latest backup.

This is a quick way to remedy the problem, as long as you aren’t worried about losing any data between your last backup and now.

To restore your site from a WordPress file backup, you’ll need to access Jetpack via your WordPress dashboard.

  1. Go to the Jetpack menu and select “Backup.”
  2. Choose the backup you’d like to use.
  3. Click “Restore.”

Follow the prompts to confirm which parts you want to restore.

Just be aware that a full backup restore will override every WordPress file on your site.

How To Avoid This Error in the Future

You can do a few things to avoid the error establishing database connection issue in the future.

  • Write down or save your username and database password someplace safe.
  • Always have a backup of your WordPress site files.
  • When you migrate your files, confirm none of them are corrupt before relaunching your site.

Wrapping Up

It can be a bit nerve-wracking when your site goes offline, especially if it’s a WordPress database error and not one on your end.

Fortunately, the fixes above should remedy the “error establishing a database connection” issue.

Contact your CMS or web host provider’s support team to get expert help if you still need guidance.

]]>
https://bloggingtips.com/error-establishing-a-database-connection/feed/ 0