Migrating Wordpress Website from Apache to Nginx

Recently my Wordpress website is running apache and it is hosted on Digital Ocean. Now, I want to migrate my website from Digital Ocean to Linode. The website is migrated successfully but only the website's Homepage working well. Whenever I click on a link from my homepage it downloads an unknown file named "download" and when I visit any of my post from Google ranking it show 404. Earlier when I shifted my website from one server to another I had the same problem but I solved the issue in Apache using Allowoveride All. I tried to take help from google & StackOverflow but still not working. Can you please help me in finding the issue. My website is https://djhry.com

1 Reply

The issue is solved now. Just read a blog on Nginx for converting Apache Rewrite Rule and it solved my issue.

I have to write this in the Nginx configuration file.

location / {
try_files $uri $uri/ /index.php?$args;
}

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct