Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

jcpeden on "Custom Plugin Admin Page: How To Call a PHP script using AJAX?"

$
0
0

I've written a plugin that creates a backup of wp-content and zips it too. At the moment, its basically just a PHP form and the user can select what they want to back up.

On some hosting systems, the plugin encounters php_max_execution_time and halts. Additionally, the admin page has to wait for the script to run before it can load which doesn't look particularly nice.

How can I use AJAX to call the PHP script to run the backup/restore process without the user leaving/reloading the admin page? How can I also ensure the process is carried-out in small chunks which avoid timeouts?


Viewing all articles
Browse latest Browse all 26892

Trending Articles