I have 2 WordPress sites that I’ve upgraded to PHP7.
One was from 5.4 to 7 and the other was 5.6 to 7.
After migrating the WP files and the DB, I get a 404 on on pages and posts. If I change permalinks to default, posts start working but pages do not.
However, if I change permalinks to Post Name, posts stop working again with a 404.
I thought something may have corrupted the DB but it doesn’t look to be the case. I pointed the new site at the old DB and the same behaviour was displayed.
The old site pointing to the old dB works fine.
.htaccess is writable and WordPress is writing to it when I change permalinks.
Nothing has changed with the blog – it’s just a lift & shift. Everything has stayed the same including the domain name.
Have some php modules not been installed? Has anyone had this before?
Any help is much appreciated.
Read more here:: 404 on pages after PHP and Apache update