If like me you changed your “Permalinks” and got a 404 error for all old post you probably googled it and ended up at this page
Although very useful, i did not find my answer, but it did point me in the right direction
First i checked that .htaccess file existed in the WordPress folder,
Then i checked the write permissions.
Then i made the change on the WordPress site to change the permalink and re-opened the .htaccess file.
I could see it had been altered and so knew that to was writing to the file correctly
My problem was the Apache2 mod-rewrite was not enabled
To enable it use:
sudo a2enmod module_name
Module name is rewite
To disable it use:
sudo a2dismod module_name