WordPress is a cool web building tool; it helps to set up a website quickly and with less stress.
Even With zero coding knowledge, you can build a website that looks professional and at the same time efficient, but nothing is 100% perfect, WordPress has its own downside too, there are several errors that WordPress can throw at you, but be rest assured, WordPress has large support and every error you may come across has already been encountered by someone else and it might have been fixed or being fixed. One of the said errors is 504 Gateway Timeout Error.
What is 504 Gateway Timeout Error?
When you access a website from your device, the web browser sends out a request to the web server you are trying to access, information is shared and received between server and client, but in most cases connections go through many servers to reach main server, any time one of the servers is down and the request sent by your web browser cannot get to its destination you get the “504 Gateway Timeout Error”, this error is not exclusive to WordPress, custom websites too can also generate this error.
The downtime of the servers are rare and short, your web browsers have been designed to automatically resubmit the request that even you may not know that the first request failed, prolonged downtime is what results in this error.
How to fix WordPress 504 Gateway Timeout Error
Oftentimes a 504 Gateway Timeout Error will go away when you clear cache, cookies and reload your WordPress website, but if it doesn’t, there are ways to fix it, try each method in the order they are listed below to fix the error;
1. Check your proxy settings; sometimes some third party plugins might have changed proxy settings without permission, some servers have been programmed to receive requests in a hierarchy, which means a request must come from a server nearest to you, changing proxies and IPs change these settings and may result in wrong connections. This should be the first method to fix a 504 Gateway Timeout Error. Fixing this error differs from browser to browser, we are going to use chrome as an example, follow the steps below;
i. Click on the three-vertical-dot icon located at the top right edge of chrome homepage, this will access the chrome menu, click on settings, the next page that shows up is the chrome settings page.
ii. On this page, type proxy into the search bar, the system section will be displayed and you are going to see something that looks like the screenshot below, click on open proxy settings to proceed.
iii. A new window will pop up, look for LAN settings and click on it, another smaller window will pop up, check if either “Automatically detects settings” or “Use automatic configuration script” option is checked, if yes uncheck and then save the settings,
Refresh your browser and visit the website again, if the error persists, try the next method.
2. Ensure your hosting provider is not having issue; most of the time the hosting providers are the source of the error, a standard hosting company should email you of any current issue that might affect the operation of your website, visit your hosting website and submit a report, they might help you fix the issue or direct you on how to do so or let you know they are the source of the error and tell you that the issue is being fixed.
3. Make sure your domain is active; sometimes domain servers too do go down, and that is why it is advantageous to purchase domain where you purchased hosting plan. Domain acts as pointers to websites, they lead the browser to exact location your web files are stored, the domain information is stored using Domain Name System (DNS) which consists of multiple servers across the globe, when any of these servers are down, your domain fails to point to your web location, and that is one of the major factors behind a 504 Gateway Timeout Error. To resolve this, you need to check the status of your domain with tools like https://dnsmap.io/, type your domain name into the provided box, select type of your domain record, and click on the Check DNS propagation button. Normally, the whole results should be green, if you found several that are red, contact the website where you purchase the domain and report the issue.
4. Disable your WordPress plugins; WordPress plugins too have some parts to play in the 504 Gateway Timeout Error, if you discovered this error showed up when you just installed or modified a plugin or theme, then error is most likely caused by that plugin or theme. To fix 504 Gateway Timeout Error generated this way, login to your hosting server and access the file manager or use FTP software like FileZilla to access your web files, locate your plugins folder (you can find it inside the jupu_content folder), rename the folder to another name and reload your website.
5. Disable your CDN (Content Delivery Network); CDN helps browsers to load your website faster and also reduce workload on your web server by storing copies of your website in datacenters around the world, sometimes CDN might not be able to load your website resulting in the 504 Gateway Timeout Error. To confirm the issue is with CDN, you have to disable it, most used CDN is Cloudflare so we are using it as an example, CDN works differently and that’s why you must check your service’s documents for specific instructions. For CloudFare, go to Overview->Advanced, there is a pause button, click the button and refresh your website to see if the error persists. You can always revert this setting by going back to the pause button and clicking it again to de-activate the pause mode.
6. You can also reset your WordPress website; it is advisable to back up your website so that when issues like this arise and you are unable to find any working solution, you can wipe and restore your website. Once you have a very recent backup of your website, login to your hosting control panel, go to backup and restore section, click on restore from a file, upload the backup file and hit the restore button, your website will be restored. There are WordPress plugins that can automatically backup your WordPress website at preset intervals.
The best way to avoid any WordPress error is to not use any theme or plugins not verified by WordPress and to purchase hosting and domain from a reputable seller.