title: ajax url path is not defined, how to get the wordpress file path in ajax url?
body: <p>Getting error on ajax URL path in wordpress. It's working on localhost, But it's not working on the server. And my upload-file.php is located at <strong>domainname.com/wp-content/themes/mytheme/upload-file.php</strong> How can I define the URL path jquery ajax? Please help me to solve the issue.</p>
  
  <p>Here is my code sample: </p>
  
  <pre><code>$.ajax({
       url:'upload-file.php',
       method:"POST",
       data: form_data,
       contentType: false,
       cache: false,
       processData: false,
  </code></pre>