\n
Clearing the browser cache<\/strong>\u00a0is another way to solve the problem.\u00a0You need to do this method to make sure the error that appears does not come from an error page stored in your browser.<\/p>\n<\/span>3. Try Changing Browsers<\/strong><\/span><\/h3>\nWhen clearing the browser cache doesn’t solve the problem, try switching to another browser.<\/p>\n
Trying to switch to incognito mode is also possible. This method can be done to determine whether the problem is in the browser itself.<\/p>\n
<\/span>4.\u00a0Problems with DNS<\/strong><\/span><\/h3>\nAnother cause of the 502 Bad Gateway error is a DNS problem, for example, there is\u00a0a domain name<\/strong><\/p>\n<\/span>5. Try Using Other Gadgets<\/strong><\/span><\/h3>\nWhen the cause of the 502 Bad Gateway is not resolved, you need to try the connection using another gadget.<\/p>\n
Whether it’s a laptop, computer, or smartphone. This method needs to be done to determine whether the problem lies in the internet connection or the gadget you are using.<\/p>\n
<\/span>6.\u00a0Check the Hosting Service<\/strong><\/span><\/h3>\nThe most common cause of the 502 error is usually a problem with the\u00a0web hosting\u00a0you are using.\u00a0For example, because your website is doing too many queries.<\/p>\n
This problem is more often experienced by shared hosting users, where there is a script that will stop requests from querying your website.<\/p>\n
This is done to prevent the server from going down and affecting other users with the same server.<\/p>\n
If the error is due to a problem with the web hosting you are using, we recommend that you switch to a VPSHosting service.<\/p>\n
not pointing to the correct IP address.\u00a0Errors often occur when you move websites.\u00a0Therefore, you need to wait up to the next 24 hours for it to complete.<\/p>\n
You can also flush DNS.\u00a0This method is not much different from clearing the browser cache.<\/p>\n
<\/span>7. Check Plugins and Templates<\/strong><\/span><\/h3>\nYour plugins and templates can be the source of the 502 Bad Gateway error.\u00a0The script or query from your website can be stopped by the server system due to a problematic script on WordPress.\u00a0So, the source of the problem is often found in plugins or templates that you install.<\/p>\n
To overcome this, you can check by deactivating all plugins, then try to access your website again before making sure the error is still there or not.<\/p>\n
To deactivate a plugin, please log in\u00a0to the WordPress dashboard<\/strong>\u00a0first then select the\u00a0Plugins> Installed Plugins<\/strong> menu.<\/p>\nThen, put a checkmark on all plugins, select\u00a0 Deactivate<\/strong> from the dropdown menu, and click\u00a0\u00a0Apply<\/strong>.\u00a0You can see the visualization of the further explanation in the image below.<\/p>\n
<\/p>\n
If the WordPress dashboard on your\u00a0WordPress hosting<\/strong>\u00a0cannot be accessed, deactivate the plugin can be via an\u00a0FTP client such as FileZilla<\/strong>.\u00a0To deactivate a plugin, you can rename the\u00a0plugins<\/strong> folder to something else, for example, plugins-disabled<\/strong>.<\/p>\nNext, access the\u00a0plugins<\/strong> folder by going to the main directory of your WordPress installation, then opening the\u00a0wp-content<\/strong> folder.<\/p>\nIf the error does not appear, please reactivate your plugins one by one through the WordPress dashboard.\u00a0Don’t forget to also rename the\u00a0plugins<\/strong> folder that you changed earlier.<\/p>\n<\/span>8. Temporarily Deactivate the CDN<\/strong><\/span><\/h3>\nIf your website\u00a0uses a CDN like Cloudflare<\/strong>, please deactivate it temporarily by changing the Cloudflare nameserver with your hosting nameserver.<\/p>\n<\/span>9. Check the Error Log<\/strong><\/span><\/h3>\nIf a 502 bad gateway error appears on your website after you made certain changes, then it’s most likely that the change caused the error.\u00a0Viewing the error log is one way to find out.<\/p>\n
To enable error logs on WordPress, all you have to do is add a few lines below to your wp-config<\/strong>.<\/p>\ndefine<\/span>(<\/span> 'WP_DEBUG'<\/span>,<\/span> true<\/span> );<\/span> \r\ndefine<\/span>(<\/span> 'WP_DEBUG_LOG'<\/span>,<\/span> true<\/span> );<\/span> \r\ndefine<\/span>(<\/span> 'WP_DEBUG_DISPLAY'<\/span>,<\/span> false<\/span> );<\/span><\/code><\/pre>\nTo see the entry changes that have occurred, you can access the\u00a0wp-contents \/ debug.log file<\/strong>\u00a0to analyze the errors that occur.<\/p>\n<\/span>10. Contact Customer Support<\/strong><\/span><\/h3>\nThis method is the last step when the 502 Bad Gateway problem is not resolved using the methods described above.\u00a0Describe the chronology and when you encountered this 502 error.<\/p>\n
<\/span>Closing<\/strong>