If you have good exposure and you are using WordPress from pretty long time, you might have encountered with “Connection timed out” error. When you or some one is trying to open your website and all of sudden you get a message “Connection timed out” instead of your website. In actual Connection timed out error not only appears while opening the website, sometime it can appear during posting your blog post or creating a custom page or performing any other activity on your website. Even in some cases if you are working with your website and you will get some message saying “WordPress system is unavailable” and all of sudden after that you will get an error Connection timed out.
You can get irritated with the issue and sometimes it takes a decent amount of effort to fix the issue and sometimes it is easy fixed without doing anything. Though there are some precautions that you can take to prevent it from happening or fix the issue whenever it surface on your website.
Lets see First Why Connection Timed Out error happens?
Connection timed out error is common and as per experts it occurs when we try to over utilize our resources, In other words your website tries to perform multiple activities and your server is not able to handle it. The other reason for this error to appear is when your IP is blocked by the hosting provider. If you are using shared hosting plan this would be a common issue for you. There is one more reason for Connection timeout error to appear and that is low memory or limited memory. I hope going through this post you would be able to fix and restore your website.
Issue fixing time : How to Fix Connection Timed Out error?
For fixing the Connection Timed Out issue, Please try all of these steps from below,
- Starting with Deactivating or disabling plugins
- Switching to the default WordPress theme
- Then try to maximizing the execution time in php.ini file
- Try increasing PHP memory limit
- Connect with your internet service provider (ISP) for the issue(even for ip block)
- You can try increasing the execution time for the processes
- Then you can try Checking your proxy setting if you have applied some.
- Perform a Check firewall and website filtering also
- You can try Clear Browsing data (Sometime it also helps)
Deactivate or disable Plugins
If there is no issues from server end related to IP blacklisting, Over utilization of resources, The first action which should be taken by the site owner after getting connection timed out is to disable or deactivate all the plugins on your website. Once all the plugin is disabled try to open the website, If you are able to access the website then you can start enabling plugins one by one and if don’t forget to keep on checking your website after enabling each plugin, upon enabling the faulty plugin you will encounter the connection timed out error again. Try removing the faulty plugin or installing an alternate plugin that can work for you. If disabling plugin does not fix your issue then, Try to find the issue in some other area.
Try switching your WordPress theme to default
Switching the WordPress theme to default theme is one of the most common solution attempt to fix the connection timed out error. I have been to many discussion forms related to WordPress every other developer’s first suggestion is to revert the theme to default theme, either twenty twenty or twenty nineteen. Switching your theme to default fixes the issue of connection timed out in many cases.
Increase WordPress memory limit
There are many cases where the problem lies with the memory limit set for WordPress. To fix that you need to increase memory limit. This can be done starting with wp_config.php file followed by php.ini. In case you are using a shared hosting you might need to connect with the hosting provider to get the memory limit increased to get connection timeout error fixed.
The other case is to increase memory limit by yourself if you have authorization to do so, First try by yourself, if you get authorization error or you are not able to update you can connect to your hosting provider. Now to update the memory limit manually, You need to go to wp_config.php file and edit it. Add the below code snippet just before the line which says “That’s all, stop editing! Happy blogging.” .
The other option to proceed with, after performing the above one, is to update the memory limit in php.ini. Where can you find this file? php.ini is default configuration file for php. In an ideal situation the file will be lying in your web server’s root directory or folder, Also it can be present in sub folder or sub directory (example: /wp-includes) with the required configuration needed. You might not have access to this file, but you can create the php.ini file for specific requirement on the required directory to override the default configuration values. You can do the memory update adding below code to the php.ini file
memory_limit = 256M
If the above steps don’t work, Then you have to contact your hosting provider.
Increase the Execution Time
Form the issue name, we can see the name is related to time (connection timed out). This can be one of the thing that we can verify. For this in an ideal scenario you might not have access to perform this activity, i am going to mention. You need to connect with your hosting provider to update the code “max_execution_time = 60;” in php.ini which will increase the code execution time to 60 minutes.
Hope this will be helpful in fixing issues related to connection timed out error.