title: Wordpress "admin-ajax.php" 404 Error
body: <p>I created a website for a small bed and breakfast, but I found a problem, which I don’t understand if it is depended on WordPress or the server.</p>
  
  <p>This website uses a pop-up animation to show the room description. The problem is that this popup has stopped working in the last week. From browser console, I noticed that the whole thing depends on a 404 error (admin-ajax.php not found). Here it is the detail:</p>
  
  <pre><code>jquery.js?ver=1.12.4:4 POST http://lettoacastello.net/wp-admin/admin-ajax.php 404 (Not Found)
  send @ jquery.js?ver=1.12.4:4
  ajax @ jquery.js?ver=1.12.4:4
  (anonymous) @ script.js?ver=4.9.1:207
  dispatch @ jquery.js?ver=1.12.4:3
  r.handle @ jquery.js?ver=1.12.4:3
  </code></pre>
  
  <p>To be able to solve the problem temporarily, I <strong>simply reinstall WordPress</strong> from dashboard. The problem doesn’t occur again for a whole day, all works fine! But the next day all starts over and the problem presents again (this cycle continues like this every day). For this reason I do not understand if it is a server problem or not.</p>
  
  <p>A last very important thing. The popup has <strong>no problems if I am logged into WordPress admin panel</strong> (the browser recognizes “admin-ajax.php” file).</p>
  
  <p>The code was not written by me (the developer says that the problem does not depend on him).</p>
  
  <p>However, I believe this is the portion of code that controls room popup:</p>
  
  <pre><code>jQuery(document).ready(function($){
  
  $('.special-room button.btn, .rooms-sec button.btn').live('click', function(e){
  
      e.preventDefault();
  
      $('#room.modal').html('');
  
      var thislink = this;
  
      var page_id = $(this).data('id');
  
  
  
      $.ajax({
  
          url: ajaxurl,
  
          method: 'POST',
  
          data: 'action=_sh_ajax_callback&amp;subaction=sh_room_detail&amp;post_id='+page_id,
  
          success: function(res){
  
              $('#room.modal').html(res);
  
          }
  
      });
  
  
  
  });
  </code></pre>
  
  <p>Please, can I ask you for help? Unfortunately I’m not very technical.</p>
  
  <p>Thank you</p>