I’m running the webserver on Debian for the radio station (using a small VPS provider, absolutely plenty for our needs) but I was having one problem – I would try to change the permalinks from “Default” to “Post Name” and every page or post, not including the front page, would 404.
I’d change back to “Default” – the 404 goes away. I started to have a look around and the best walkthrough I found was one by wpbeginner.com but it didn’t work. I was missing one thing in my Apache2 file for wordpress.
/etc/apache2/sites-available/wordpress needed to look like so;
My AllowOverride was “None” and not “All”. Changing that did the trick! Apache was ignoring my .htaccess file, and thus breaking all the new links.
The .htaccess file at /var/www/wordpress/.htaccess should look like this (mine was always like this, but it doesn’t hurt to check);
I did a restart of the VPS, then once everything was back up I went to Dashboard > Settings > Permalinks, made sure “Post Name” was checked and clicked “Save Changes” again. I went to a page with the new permalinks and Voilà! Happy days.