How to fix a “cURL error 28: Connection timed out” in WordPress ?

I recently received this error on a wordpress site update:

cURL error 28: Connection timed out after 10001 milliseconds with wordpress update.

The Fix:

  1. The first thing to do is to update your WordPress to the latest version if not already done.
  2. Then, check the following points :
  • Make sure your server is running a recent version of PHP and the cURL library.
  • Try to increase your Server Memory Limits settings.
  • The cURL error can be a dns related issue. Your hosting company might need to switch dns configuration to Google, Cloudflare or OpenDNS : https://www.howtogeek.com/164981/how-to-switch-to-opendns-or-google-dns-to-speed-up-web-browsing/
  • Ask your host if there is some limitation with wp-cron, or if loopback is disabled.
  • Ask your host if there a firewall or security modules (e.g. mod_security ) that could block the outgoing cURL requests.

More information here: https://www.samuelaguilera.com/post/curl-error-28-wordpress

How to change the Primary IP Address of a WHM/Cpanel server

This is for CentOS/RHEL based servers.

Steps in WHM: Log into WHM and go to Basic cPanel & WHM Setup.

Change the Primary IP here with the option that says “The IP address (only one address) that will be used for setting up shared IP virtual hosts”

Log in to SSH, and do the following:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0
Change the IPADDR and GATEWAY lines to match the new IP and Gateway for the new ip

Edit /etc/sysconfig/network
Change the GATEWAY line here if it does not exist in the ifcfg-* file.

Edit /etc/ips
Remove the new primary IP from this file if it is present
Add the old primary IP to this file with the format


 <IP address>:<Net Mask>:<Gateway>

Edit /var/cpanel/mainip
Replace the old primary IP with the new primary IP

Edit /etc/hosts
Replace the old primary IP with the new one if needed. The hostname’s dns will need to be updated too

Restart the network service to make the new IP the primary

# service network restart

Note: You’re probably going to be disconnected at this point, and have to log in to ssh using the new primary ip.

Restart the ipaliases script to bring up the additional IPs

# service ipaliases restart

Run ifconfig and make sure all IPs show up correctly

Update the cpanel license to the new primary IP

Verify you can still log in to WHM and there is no license warning

Plesk Optimization for 504 Gateway Time-out

A website is not accessible with “504 Gateway Time-out”

Log files show:


# tail -n1 /var/log/httpd/error_log
[Tue Sep 04 19:11:38.300358 2018] [mpm_event:error] [pid 1192:tid 139861305055360] AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

/var/www/vhosts/domain.com/logs/error_log
[proxy_fcgi:error] [pid 50203:tid 139860761302784] (70007)The timeout specified has expired:

https://support.plesk.com/hc/en-us/articles/115000064929-A-website-is-not-accessible-with-504-Gateway-Time-out-The-timeout-specified-has-expired-client-203-0-113-2-54693-AH01075-Error-dispatching-request-to

How to Update the Default Plesk SSL (not domain ssl)

You can update the SSL through Plesk under Tools & Settings -> SSL/TLS Certificates.

To change the default Plesk certificate and do not reassign certificates for all domains manually, do the following:

  1. In Plesk open Tools & Settings > SSL/TLS Certificates > Add > proceed with adding new certificate.
  2. Return to Tools & Settings > SSL/TLS Certificates > select the certificate created in previous step > Make Default .

Office 365 Anti-Spam IP Delist Portal

If you’re trying to send mail to an Office 365 recipient and the mail has been rejected because of your sending IP address, follow these steps to submit a delisting request.

Error messages may be similar to the following:

ECDHE-RSA-AES256-SHA384:256 CV=yes: SMTP error from remote mail server after RCPT TO:: 550 5.7.606 Access denied, banned sending IP [xxx.xx.xxx.xxx]. To request removal from this list please visit https://sender.office.com/ and follow the directions. For more information please go to http://go.microsoft.com/fwlink/?LinkID=526655 (AS16012609) [HE1EUR01FT043.eop-EUR01.prod.protection.outlook.com]

Generate ssh keys on linux and use with PuTTY on Windows

Log into the Linux server as the user you are going to use to connect with ssh. Generate the key.

ssh-keygen -t rsa -b 4096 -C "email@domain.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:3/dDa9R+zzDpGNt/EU9Jusj/snbKt3+B8F+ULnxXtWk email@domain.com
The key's randomart image is:
+---[RSA 4096]----+
|                 |
|               ..|
|              o *|
|           . . E+|
|        S . = =o=|
|         . + * O=|
|          . + @.*|
|            .@ %=|
|            ++@+#|
+----[SHA256]-----+

Now copy the id_rsa key to your Windows desktop. This can be done by copying and pasting the contents of the file or using an SCP client such as PSCP which is supplied with the PuTTY install or FileZilla.

Read moreGenerate ssh keys on linux and use with PuTTY on Windows