Emergency Plugin Fix
“;
// Get active plugins
$active_plugins = get_option(“active_plugins”);
$plugins_to_remove = array(
“optimization-detective/load”,
“comprehensive-seo-solution/comprehensive-seo-plugin”
);
$removed = array();
foreach ($plugins_to_remove as $plugin) {
$key = array_search($plugin, $active_plugins);
if ($key !== false) {
unset($active_plugins[$key]);
$removed[] = $plugin;
}
}
if (!empty($removed)) {
$active_plugins = array_values($active_plugins);
update_option(“active_plugins”, $active_plugins);
echo “
Removed plugins:
- “;
- ” . $plugin . “
foreach ($removed as $plugin) {
echo “
“;
}
echo “
“;
}
// Clear transients
global $wpdb;
$wpdb->query(“DELETE FROM {$wpdb->options} WHERE option_name LIKE \”_transient_rank_math_%\””);
echo “
Cleared Rank Math transients
“;
// Test meta description
$html = file_get_contents(home_url());
if (strpos($html, “✅ Meta descriptions working!
“;
} else {
echo “
❌ Meta descriptions still not working
“;
}
echo “
“;
} else {
echo “
Click to Fix Meta Descriptions
“;
}
?>