uninstall.php does not appear to trigger when uninstalling my plugin

I don’t see any issue with the uninstall besides the fact that echo a string(this interpreted us failed) and using hardcode prefix. Below code have been tested locally with the latest version of WordPress. // Access the database via SQL global $wpdb; $wpdb->query( “DELETE FROM {$wpdb->prefix}posts WHERE post_type=”acme_product”” ); $wpdb->query( “DELETE FROM {$wpdb->prefix}postmeta WHERE post_id … Read more

How can I completely disable a WordPress installation?

You could move the files to a non-web-accessible directory and change the password on the database user. eg, if your site’s root directory is /var/www/html, you could create a directory elswhere on the server (say /home/me/site-archive) and move the files from /var/www/html into /home/me/site-archive. If you ever want to re-activate the site, you can move … Read more