WordPress Permalinks Issue aka All Pages were showing 404 except home page

Recently I migrated my this blog from hosting server to my server using WPClone and all data was shifted smoothly but was facing an issue related to url rewriting.
All links with-in website were showing 404 except home page and obviously WordPress admin panel 🙂
When I tried to fix it through (Settings > Permalinks) I observed that only default/Plain link structure was working which does not have user friendly url rewriting.

I found this as very common issue discussed on forums and online blogs accross the internet with multiple solutions mentioned there including grant rights to .htaccess file then delete and re-create from admin panel was very common but unfortunately non of the approach I founded seems to be useful in my scenario but I found a solution that was at least working but not suitable for me, was to append \index.php\ in custom structure mentioned in this post. author told his approach that was quit interesting and out of the box solution,

How did I find this out? I went ahead and did a clean install of WordPress, and looked under permalinks settings to see it. When I saw that was the case, I suspected all I’d have to do was set it back to that exact custom structure. And indeed that fixed it.

But In my case it was appending index.php to all urls that was looking quite awkward so I decided to look for any other solution.
Then finally I found required solutions provided at WordPress support forum’s article that did a trick. @thavaprakash suggested to update AllowOverride to All in apache2.config that was by default set to None, he said.

I have made below changes in apache2.conf to fix. Its working for me.

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All # earliear it was “none” instead of “All”
Require all granted
</Directory>

above solution works in my case.

Leave a Reply

Your email address will not be published. Required fields are marked *

rfwbs-slide