Question about Computers & Internet
Connection Timed Out in WordPress
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.
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.
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.
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.
Posted on Oct 05, 2021
Tips for a great answer:
Usually answered in minutes!