Can’t publish new posts

There are, still, references to old domain in your database, which have to be fixed.

Step 1: go to Settings -> Permalinks and click on Save Changes button. This will fix your permalinks.

Step 2: install and activate Better Search Replace plugin. Go to Tools -> Better Search Replace. Replace the old domain ( example.com ) to the new one ( whatever.net ) in all tables.

You can skip Step 2, if the domain name didn’t change.

Make sure that admin cap is exactly a:1:{s:13:"administrator";b:1;}.