Troubleshooting a single site's connection | GreggHosting

The affects of Web Hosts on Your Business Website

Here're ways your choice of web hosting service provider impacts the performance of your business:


Website loading speed


Uptime and availability


Customer support




Server location

Troubleshooting a single site’s connection

Troubleshooting a single site’s connection

site's connection


This page contains a list of common mistakes that you may encounter on your website, as well as troubleshooting strategies for resolving the issues.

Many difficulties can impair the performance of your website in a shared hosting environment. They can include issues with your database, hacked code, website misconfigurations, and reaching memory limits, which leads your processes to be killed.

To make matters worse, these issues frequently trigger one another. For example, a compromised site may clog the database with junk data, making it take longer to load and consume more memory, causing the user to exceed the site’s memory restrictions.

Troubleshooting a single site

There are a variety of reasons why your website isn’t loading. The first step is to recognize the signs and symptoms you’re experiencing. When a website fails to load, the following are some of the most common symptoms:

Immediate 500 Internal Server Error

The site spins for a bit, trying to load, and finally displays a 500 Internal Server Error.
When the site tries to load, it returns a 522 site’s connection timed out error.
The site loops indefinitely while attempting to load.
The site loads quickly, but only a blank page appears.
The site loads quickly, however there is a database site’s connection issue.
The site loads quickly, yet a 403 Forbidden Error appears.
The site loads, but instead of what you expected, it displays a 404 Error.
The site loads, but a WordPress Error appears.
Each of the aforementioned concerns is addressed in the following sections.

500 Internal Server Error Immediately
There are two things that could lead to this.

.htaccess problems
.htaccess difficulties due to shared server memory limits
If the issue occurs immediately, it is most likely due to a problem with your site’s.htaccess file. Here are a few things to keep an eye out for:

The.htaccess file has syntax problems.
PHP configuration that isn’t working
Try renaming the.htaccess file in your site’s home directory to “.htaccess.disabled” to see whether this is the problem. If the issue is with your.htaccess file, it will be resolved immediately.

Remember that.htaccess rules apply to all subdirectories, thus an.htaccess file outside of your site’s web directory could have an impact on your site. Look further up in the directory structure for any.htaccess files that might be causing problems, and try renaming any you discover to see if it helps.

Experiencing memory issues
If that doesn’t work, it’s possible that your processes are being killed because your user’s RAM limit has been exceeded. Checking to see which processes you have running as your user is a fast approach to see if this is harming you. Several tools for investigating your running processes and memory utilization are listed in the following articles:

Troubleshooting tools for the command line
Site spins trying to load for a while and then displays a 500 Internal Server Error
This can be caused by a variety of factors.

As previously mentioned, reaching memory limits

PHP has run out of time.
If this only happens on certain pages (namely, the admin pages for the software you’re using), then this is very likely the problem. Create a custom phprc for your site and increase the max execution time option to 2-3 times what it is today to see whether this is the problem.

If this happens on all of your pages, it’s possible that it’s a PHP timeout. Check your site’s error logs to see if any helpful error messages are present. There isn’t much information to troubleshoot if all you see is a “Premature end of headers” error, as this just means the script exited before finishing.

More information on constructing a custom phprc file can be found in the following article:

What is a phprc file and how do I make one?

Site tries to load then displays a 522 connection timed out error

When Cloudflare runs out of time contacting the origin web server, the 522 site’s connection timed out error shows only on Cloudflare-enabled domains. For more information on how to troubleshoot a 522 error, see the following article:

site’s Connection timed out, error 522

Site spins while loading forever

This is perhaps the most common thing that can go wrong with your website. This usually indicates that something is causing your PHP processes to stall. If you use the top -c command on the server, you may see the word defunct next to some of those processes. This can be caused by a variety of factors.

This is frequently due to database tables having overhead in WordPress. That shouldn’t cause any issues, but WordPress can get itself into a terrible state if there is any overhead (especially in the wp options table), and it will frequently display this symptom. Other common causes include software misconfigurations or incompatible or poorly coded third-party addons to the software you’re using.

More information on lowering overhead and optimizing WordPress can be found in the following articles:

How can I make my database more efficient?
Articles on WordPress optimization

Site loads immediately, but only a blank page displays

The most common cause of this problem is a problem with a WordPress theme or a caching plugin that isn’t working properly. This one can be a little tough to solve depending on what’s going on, and it’ll probably take some fiddling to bring things back to normal.

Site loads immediately, but displays a database connection error
For more details on how to troubleshoot a database site’s connection error, see the following article:

An error occurred when establishing a database site’s connection.

Site loads immediately, but displays a 403 Forbidden Error

When a deny rule is specified for an IP in a site’s.htaccess file, or when file permissions prevent the web server from serving up a page, the 403 Forbidden error is displayed. By looking at your error, you can typically figure out what’s causing it. log file name:

Using SFTP to view your access and error logs
Using SSH to view and examine your error log
The majority of the time, this is due to a lack of file permissions. To verify your site’s permissions, go to:

SSH is used to log in.
Using the ls -la command, you can get a directory listing:
$ ls -la drwxr-x—x 16 username pg123456 4096 ls -la drwxr-x—x 16 ls -la drwxr-x—x … 2009-12-10 04:25…
The first line should like the example above. Take note of the permission string “drwxr-x—x.” The first letter stands for “directory,” and there are three authorization sets in total. The owner permissions, which are set to read/write/execute, are the first set. The second set of rights are the read/execute group permissions. The third set of rights, known as “other” permissions (or “what all other users have”), is set to execute only. If your user has Enhanced Security turned on, it will appear like this instead:


ls -la drwxr-x—- 16 username adm 4096 $ ls -la drwxr-x—- 16 username adm 4096 … 2009-12-10 04:25…
The permissions shown above are correct. If they looked like this instead:


d————————————————————————————————————————————————————- ./ 2009-12-10 04:25./ 2009-12-10 04:25./ 2009-12-10 04
Then your user has been disabled, and you should contact GreggHost immediately. If that’s the case, you’ll probably encounter errors like this when trying to log in, and you won’t be able to get the directory listing as indicated above:

Permission denied -bash: /home/username/.bash profile: Could not chdir to home directory /home/username: Permission has been denied.
If you notice this, please contact GreggHost for assistance.

If permissions appear to be fine but you’re still getting a 403 error, consider renaming your impacted domain’s.htaccess file from “.htaccess” to “.htaccess.disabled” as follows:

$ mv.htaccess.htaccess.disabled [server]
Then try loading your site again. If the 403 error is no longer present, check your.htaccess file for lines beginning with “deny.” If you find any, remove them from the file by adding a “#” before the line and saving it. You can re-enable the.htaccess file you disabled before by following the steps below:

mv.htaccess.disabled.htaccess [server]$
Check your email for a notice from support explaining why the site directory has an addition at the end of it stating that it was disabled by GreggHost. If you can’t find one, contact us right away for assistance.

For more information on file permissions, go to the following page:

Permissions for Unix Files
Site loads, but displays a 404 Error rather than what you expected
This is especially common with websites that use.htaccess rules for their permalinks/pretty URLs, such as WordPress. If the rules are altered or eliminated, a 404 will appear instead of the expected content.

The simplest solution is to download a fresh copy of the software you’re using from its website (e.g.,, then copy the contents of the default.htaccess file and paste it into your existing one (keep in mind that “.htaccess” files are invisible files, so you may need to enable viewing of invisible files in your FTP client to find the file if it exists).

By default, not every software includes an.htaccess file. When you modify your permalinks settings in WordPress, for example, it generates one, so keep that in mind as well. If the default.htaccess rules do not resolve the 404 error, please contact support for further assistance.

This can typically be resolved by just resaving your permalink structure in WordPress. To do so, go to Settings > Permalinks in your admin panel and click the Save Changes button.

Site loads, but displays a WordPress Error
Configuration issues can cause a number of WordPress-specific errors, such as the “technical difficulties” or “critical error” error pages. For additional information on troubleshooting and resolving these problems, see the following article: