I am attempting to set up a droplet to host a few low-traffic WordPress sites. Here are my steps so far:
try_files $uri $uri/ /index.php?$args;to /sites-available/example.com to enable pretty permalinks in WP
At this point, everything worked great. Next step was to point the live/real domain at this server using Cloudflare. Since the Wordmove push had worked previously, I decided to delete all the WordPress files from the server so I could update Wordmove’s Movefile with the appropriate live URLs and push again.
I also created a new file – for the new URL – in /etc/nginx/sites-available and symlinked it to /etc/nginx/sites-enabled, as I had done with the test domain. I edited this new file to work with pretty WP permalinks. I removed the file relating to the test domain. So now in /etc/nginx/sites-enabled there is only one symlinked file, and it includes the line
listen 80 default_server; I believe this is correct.
All the WP files are in the correct location and wp-config.php has the correct database details. As far as I’m concerned I should now be able to view this site at the new domain. However it returns an nginx 404 page.
I updated the DNS around 24h ago but if I ping either example.com or www.example.com it shows the correct IP address of my server. Also I used an online propagation check which reckons it’s done. I don’t think is a DNS problem.
How can I figure out why this isn’t working?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!