Hello @willemb2,
The plugin also adds entries to the database. The issue is most probably caused by some local security policy in your site, which prevents the deletion. Check if you have any rules, related to file writing in your wp-config.php file, like:
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true )
Also, if you have any other security plugin, its settings might be preventing the deletion process. Try disabling the other plugin temporarily.
If the issue persists, open the debug console in your browser and monitor for any errors or warnings there while recreating the issue.
Regards,
Plamen.M
Tech Support Team
SiteGround.com
Hello @plamenm,
I have no problem deleting other plugins. In fact there were 2 others by Siteground: Speed Optimizer and ….. This site was moved from Siteground to another hosting about a month ago.
Those rules are not present in wp-config.php. But I noticed something else. Could this be related:
/** Sets up WordPress vars and included files. */
@include_once('/var/lib/sec/wp-settings-pre.php'); // Added by SiteGround WordPress management system
require_once ABSPATH . 'wp-settings.php';
@include_once('/var/lib/sec/wp-settings.php'); // Added by SiteGround WordPress management system
In all my other 6 sites wp-settings.php
is in the same folder as wp-config.php and none of them has a wp-settings-pre.php
Hello @plamenm,
Here’s the wp-debug.log:
[22-Feb-2024 21:52:23 UTC] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #1 ($key) must be a valid array offset type in /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php:352
Stack trace: 0 /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php(352): array_key_exists(Array, Array) 1 /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php(292): SiteGround_Data\Settings->get_hosting_provider() 2 /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php(213): SiteGround_Data\Settings->get_main_data() 3 /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php(139): SiteGround_Data\Settings->prepare_data() 4 /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php(126): SiteGround_Data\Settings->send_data() 5 /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/uninstall.php(49): SiteGround_Data\Settings->stop_collecting_data() 6 /var/www/vhosts/domain.tld/httpdocs/wp-admin/includes/plugin.php(1245): include_once('/var/www/vhosts…') 7 /var/www/vhosts/domain.tld/httpdocs/wp-admin/includes/plugin.php(960): uninstall_plugin('sg-security/sg-…') 8 /var/www/vhosts/domain.tld/httpdocs/wp-admin/includes/ajax-actions.php(4748): delete_plugins(Array) 9 /var/www/vhosts/domain.tld/httpdocs/wp-includes/class-wp-hook.php(324): wp_ajax_delete_plugin('') 10 /var/www/vhosts/domain.tld/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) 11 /var/www/vhosts/domain.tld/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 12 /var/www/vhosts/domain.tld/httpdocs/wp-admin/admin-ajax.php(188): do_action('wp_ajax_delete-…') 13 {main}
thrown in /var/www/vhosts/domain.tld/httpdocs/wp-content/plugins/sg-security/vendor/siteground/siteground-data/src/Settings.php on line 352
-
This reply was modified 1 year, 1 month ago by
willemb2.
Since your site is on a different host, you should remove the includes commented as “Added by SiteGround WordPress management system”.
The debug results show that something is preventing our plugin from executing the Ajax Delete action. What I could suggest here is:
- Deactivate the plugin
- rename the plugin’s folder : wp-content/plugins/sg-security
- Clear the cache in your site and check if everything is functioning properly. Then you can delete the plugin’s folder also.
Regards,
Plamen.M
Tech Support Team
SiteGround.com
Thank you, @plamenm. That worked.