Connection Timed Out is a browser error that means the connection to the server is taking too long to be established.
Causes
The “Connection Timed Out” error in WordPress can be caused by excessive plugin usage and/or insufficient PHP memory. Here are some steps you can take to fix this issue:
Fix 1
Increase memory limit PHP variable:
You can increase the PHP memory limit in your WordPress site by editing the wp-config.php file. Add the following line of code at the bottom of the file: define(‘WP_MEMORY_LIMIT’, ‘256M’); This increases the PHP memory limit to 256MB. Alternatively, in cPanel you can click ‘Select PHP Version’ in the Software section. Once there, click on the ‘Options’ tab toward the top and you will be able to modify the memory_limit, post_max_size, and/or upload_max_filesize.

If you’re not already logged in, this will redirect you to the wp-login.php page.

Fix 2
Deactivate plugins and activate them one by one until the culprit is found:
Sometimes, a poorly coded plugin can cause the “Connection Timed Out” error. Deactivate all your plugins and then reactivate them one by one. If the error disappears after deactivating a specific plugin, then you’ve found the culprit. You can then decide to keep that plugin deactivated, or replace it with another plugin that performs a similar function. This can be done within your WordPress Admin Dashboard, as seen in the screenshot below.

Fix 3
Upgrade hosting plan/memory:
If your cPanel exhibits physical memory and I/O maxed out periodically or consistently, it might be time to upgrade your hosting plan or increase the memory allocation. This is especially true if your website has grown in terms of traffic and complexity.
Remember to always backup your website before making any changes to its files or database.