Back to Community

How to Completely Remove the AMP Plugin and Clean Up Residual Files

23 threads Sep 10, 2025 PluginAmp

Content

Many WordPress users who try the AMP plugin encounter a common frustration: even after deactivating and deleting the plugin, traces of it remain on their website. This can manifest as lingering amp.js scripts, persistent ?amp=1 URLs, or duplicate pages that cause SEO issues. If you've decided AMP isn't for you, this guide will help you perform a complete uninstallation.

Why Does AMP Leave Files Behind?

The AMP plugin integrates deeply with a WordPress site to transform pages into valid AMP content. This process can create transients (temporary cached data) in your database for CSS and image dimensions and, in 'Reader' mode, can generate paired AMP pages. Furthermore, search engines like Google may have cached the AMP versions of your pages independently. Simply deleting the plugin from the WordPress admin does not always clear all this generated data or external caches.

Step-by-Step: Complete AMP Removal

1. Proper Plugin Deletion and Data Removal

First, ensure you delete the plugin correctly to remove as much data as possible.

  1. Go to AMP → Settings.
  2. Navigate to the Advanced Settings section.
  3. Check the box for 'Delete data on uninstall'.
  4. Click Save Changes.
  5. Go to Plugins → Installed Plugins.
  6. Deactivate the AMP plugin.
  7. Delete the AMP plugin.

2. Clean Up Database Transients

The plugin creates transients (cached data) in your wp_options table with names like _transient_amp_* and _transient_timeout_amp_*. These are safe to delete, though they may be regenerated if the plugin is still active.

Warning: Always create a full database backup before proceeding.

  • Using a Plugin: A plugin like "WP Optimize" or "Transients Manager" can help you safely find and delete transients.
  • Manual SQL Query: Advanced users can run a query in phpMyAdmin or their database manager:
    DELETE FROM wp_options WHERE option_name LIKE '%_transient_amp_%' OR option_name LIKE '%_transient_timeout_amp_%';

3. Implement Redirects for Lingering AMP URLs

After uninstalling, visitors or search engines might still try to access old ?amp=1 URLs. To prevent 404 errors and consolidate link equity, redirect them to their non-AMP counterparts.

Option A: Using a Redirection Plugin
Install a plugin like "Redirection." Add a redirect rule with the following settings:

  • Source URL: /(.*)/amp
  • Target URL: /$1
  • Regex: Checked

Option B: .htaccess (For Apache Servers)
If you are comfortable editing your site's .htaccess file, you can add the following code. Be cautious, as an error here can break your site.

# Redirect AMP to non-AMP
RewriteEngine On
RewriteCond %{QUERY_STRING} ^amp=1$
RewriteRule (.*) /$1? [R=301,L]

Important Note: If you also use the Web Stories plugin, test these redirects carefully, as they might interfere with your stories. You may need to modify the rule to exclude the /web-stories/ path.

4. Clear All Caches

Finally, clear all caching layers to ensure your changes take effect immediately.

  • Clear your WordPress caching plugin's cache (e.g., W3 Total Cache, WP Rocket).
  • Clear your server-level or CDN cache (e.g., Cloudflare). Contact your hosting provider if unsure.
  • Clear your browser cache before re-checking your site.

When to Seek Further Help

If your site is still broken after following these steps, the issue may be more complex. The problem could be related to a conflict with your theme or another plugin that was not fully compatible with AMP. In this case, you may need to:

  • Switch to a default WordPress theme (like Twenty Twenty-Four) temporarily to see if the problem persists.
  • Deactivate all other plugins and reactivate them one by one to identify a conflict.

By following this guide, you should be able to remove all remnants of the AMP plugin and restore your site to its previous state. Remember that search engines may take several weeks to re-crawl your site and de-index the old AMP pages naturally.

Related Support Threads Support