title: Wordpress shows 404 page when saving new post or editing post
body: <p>Problem is ... when I click on edit post/edit page, it tries to open <a href="http://localhost/site/wp-admin/post-108.php?post=286&amp;action=edit" rel="nofollow noreferrer">http://localhost/site/wp-admin/post-108.php?post=286&amp;action=edit</a> and ends up on 404 page.
  It also shows the 404 page when saving a new post/page.</p>
  
  <p>I don't remember exactly what I did but it must have started after my IDE refactored the code when I was renaming a template file.</p>
  
  <p>There is no <strong>post-108.php</strong> inside <strong>wp-admin</strong> folder or inside my theme folder, but there's post.php. I don't know why it is trying to open post-108.php which does not exist.</p>
  
  <p>NOTE: It is a custom theme I am building myself using wordpress 4.7.4</p>
  
  <p>Thank you all.</p>