Calling a PHP script from jQuery in Wordpress


Staff member
I'm having trouble with understanding how php files are called with jQuery in Wordpress.

I'm trying to create a file uploader within Wordpress.

I want to call the php files called uploadifive.php and check-exists.php in the function below.

The console error is a 404 and the file isn't being reached, I've also noticed that jquery is appending the wordpress permalink into the url which is causing the 404.

How can call the php file without the permalink automatically appended to the path of the .php file?


          'auto'             : false,
          'buttonText'       : 'Browse',
          'fileSizeLimit'    : '1024 MB' ,
          'multi'            : false,
          'queueSizeLimit'   : 1,
          'checkScript'      : 'check-exists.php',                
          'queueID'          : 'queue',
          'fileType'     [ 'video/3gpp'],
          'uploadScript'     : 'uploadifive.php',
          'onUploadComplete' : function(file, data) {window.location =    'upload_to_youtube/processing.php?' + data;}