I've tried taking a copy of my Wordpress site and restoring it to a new site using a .sql export/ import. This seemed to work fine for the homepage/ menus etc but when clicking to other pages I get 404. I can see all the pages in Wordpress. I've tried changing permalink structure. mod_rewrite is enabled. Wordpress can write to .htaccess file.
I can't find any further clues as to what might be going wrong.