title: How to fix 'require() : failed opening required .../wp-includes/post.php ' error when I switch between two themes?
body: <p>When installing a theme in <code>wordpress</code> and activating it I get these errors:  </p>
  
  <pre><code>Warning: require(C:\xampp\htdocs\mywp/wp-includes/post.php): failed to open  
  stream: No such file or directory in C:\xampp\htdocs\mywp\wp-settings.php on    
  line 166  
  Fatal error: require(): Failed opening required 'C:\xampp\htdocs\mywp/wp-  
  includes/post.php' (include_path='C:\xampp\php\PEAR') in    
  C:\xampp\htdocs\mywp\wp-settings.php on line 166  
  </code></pre>
  
  <p>to fix this I put <code>post.php</code> file in <code>wp-includes</code> folder but after refreshing page, I get another error:</p>
  
  <pre><code>Warning: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' (this  
  will throw an Error in a future version of PHP) in C:\xampp\htdocs\mywp\wp-  
  content\themes\canvas\functions.php on line 73  
  </code></pre>
  
  <p>and a <code>php</code> script is added at the beginning of <code>functions.php</code>.
  finally I removed that script and then theme was installed properly.
  I installed <code>wordpress 5.2.2</code> again but when I want to switch to another theme
  these errors happen again.<br>
  I want to know why these errors happen and what's the solution.</p>