Nginx 504 Gateway Time-out in WordPress
I got this error after changing a template on one of the pages on my local machine, but as it turns out, the template had nothing to do with the time-out. It was just a delayed reaction. Some things I immediately tried was restarting nginx and also increasing the PHP memory cache to 64MB but neither thing worked.
The reason I received the error was because I duplicated the theme folder to have a backup and it was clogging up my WordPress setup. After I removed the duplicate theme, everything went back to normal. I’m glad that turned out to be an easy fix.