If you are a WordPress user with at least a few months of shared hosting experience, you may notice error messages such as “connection timeout“. This is a problem that can lead to many other problems, especially if you have a membership website. In this post, we’ll deeply drive into the “Connection Timed Out in WordPress” error, and check why you might see this error and how to fix it quickly. Simply put, this means that the system is not available and the specified connection time has elapsed and the request has now timed out. But what does that mean? A connection timeout error occurs when your website attempts to perform an operation that the server cannot manage. This is particularly common on shared hosting with limited memory.
All the hosting website users are recommended to use WHMCS as it allows to customize your WHMCS website using WHMCS Themes just the way it should be
Connection Timed Out in WordPress
This error message is displayed when you reach all server resources and memory usage. However, you will not receive regular notification that the server cannot process any additional execution.
The problem itself does not give the exact location that needs to be fixed. However, the general idea is that the server cannot receive or execute any other requests from web browsers or plug-ins, or topics.
For example, if you are using Cloudflare, the error is the same as above, but the code is 522, which means that the server has not responded for a long time.
Like any other problem on the network, there are solutions. If you are not sure which method is suitable for you, you can start applying them one by one.
If you try to increase the memory limit, this will only solve the problem if you host your WordPress blog or website with a powerful hosting company.
In other cases, when using shared hosts, an increase in memory limits usually does not resolve connection errors. This is only because the resource is shared. If it works now, it will return again later, and so on.
So, first of all, if you really want to completely forget these errors, you need to use an optimized WordPress hosting service and powerful resources. I recommend premium WP engines because they are leaders in the premium and WordPress hosting industry.
In addition, if you use CDN, you will naturally speed up your site, and you will save a lot of resources and faster execution time. I only recommend MaxCDN as the real and most secure platform.
Fix WordPress connection timeout error
Now let’s fix the problems in the shared hosting environment.
1. Increase the maximum execution time to fix the WordPress connection timed out error
We will try to increase the execution time in the server, which is the first thing to verify because the error involves the time in the connection. This means that the maximum execution time may be problematic. The first thing you need is the “php. ini” file in the server.
Remember, WordPress will not add this file to your blog. This is the server configuration, and the hosting company is the only company that can manage the file and allows its customers to edit or not edit the file. If you find the file but cannot edit it, you need to contact your managed customer support. Then, let them increase your maximum memory limit.
If you can find the php.ini file and edit its contents, add the following code and save it.
max_execution_time = 60
The second option you have is to edit the “htaccess” file. If you can’t find that file, you can create it yourself. What you have to do is create a new file named “. Htaccess”. Then, update your permanent link and let WordPress automatically regenerate the engine code.
If you already have a “htaccess” file like most sites, you can add the following code to increase the maximum execution time, which is 30 seconds by default.
Code-php_value max_execution_time 60
Indeed, you need to save the file after making changes. If the server can handle more requests, this will solve the problem, but the limited execution time is the cause of the problem.
2. Disable WordPress plug-in
When you have many plug-ins, especially those that have many PHP requests to your server, it becomes crucial to execute and respond to these thousands of requests. Therefore, make sure to disable all plug-ins at once from the WordPress dashboard. This will allow you to verify that your plug-in has problems that need to be corrected.
Reactivate your plug-ins one by one until you find the problematic plug-ins. Then, delete it, or search for other tools. For example, if you are using plug-ins that need to be used once a week, it would be better to disable them.
If you can’t access your administration area and activate or disable plug-ins, you can disable them from your cPanel by renaming each plug-in. For example, add “off” at the end of all plug-in names. This will disconnect them from WordPress till you finally remove the “off” and they will no longer work.
Find your plug-in folder in “WP content/plugins”, then rename the plug-in to “Akismet”, for example, “AkismetOff”, and repeat for all other plug-ins. Then, when you delete “off” and reactivate each plug-in, you can test your site.
3. Increase the memory allocated by PHP
The maximum memory allocated or allotted on the shared hosting server makes things limited. Therefore, if the limit is reached, PHP is no longer executed. In some cases, you will receive a connection timeout error instead of a memory size error message.
To increase the maximum PHP limit, you need to add the below-mentioned code to the “wp confing. php” file.
Code—define( ‘WP_MEMORY_LIMIT’, ’64M’ );;
This works only if you are allowed to increase the memory limit. Some hosting companies will close the door to their users to allocate more memory. In this case, you should contact them and ask them to provide more memory for your site.
4. Verify WordPress Theme
In other cases, a theme can be a problem if it sends a large number of requests and is not well encoded with minimal optimization.
Quite simply, you can switch to another theme, or simply use one of the default WordPress Themes and verify that it works.
In addition, if you are unsure of the source of the theme, you can scan for malware in the theme. This is another thing you should avoid. Free themes can cause a lot of problems and damage the website.
5. Check the server file compression
This is another rare situation that can be solved if you have a large number of requests to the server. You can compress HTML and text files, which will reduce the number of requests from the web browser to the server.
Usually, when you time out sending error messages, especially in WordPress, you need to verify these contents. WordPress requires a lot of resources, which is why optimizing the WordPress host has become popular and necessary in the past few years. A lot of PHP execution and requests will never work in a classic hosting environment
We would like to hear about your problems, questions, and suggestions about How to Fix “Connection Timed Out in WordPress”. So feel free to contact us.