Documentation

Uninstall

To completely uninstall WP Offload Media or the Assets Pull Addon, follow the steps below. Before doing so remember to take a backup of your database.

Steps for completely uninstalling the now deprecated Amazon Web Services and Assets Addon plugins can be found near the end of this guide.

WP Offload Media

Before deactivating and deleting the plugin you must ensure all Media Library files exist locally. To do so, visit the WP Offload Media settings page and click the “Download Files” button in the “Download all files from bucket to server” sidebar box (Pro only). This will download all Media Library files from the bucket to your local server.

Offload Media - Download All Files From Bucket

Optionally, you might want to remove the Media Library files from the bucket if they are not being used by anything else. You can quickly remove all files from the bucket that WP Offload Media offloaded by visiting WP Offload Media’s settings page and clicking the “Remove Files” button in the “Remove all files from bucket” sidebar box (Pro only). This will download all Media Library files from the bucket to your local server and then delete them from the bucket.

Offload Media - Remove All Files From Bucket

Once the download or remove from bucket tool has completed you can safely deactivate and delete WP Offload Media.

Crons

Using a plugin such as WP Crontrol ensure any cron events with the following prefixes have been removed:

  • as3cf_*
  • wpos3_*

Database Cleanup

Run the following queries via the CLI or using a tool such as phpMyAdmin. Remember to substitute wp_ with your database prefix.

For multisite installs you should run the Options and Transients queries on every wp_{0-9}options table as well as on the wp_sitemeta table, substituting meta_key in place of option_name. The Items Custom Table query should be run for every wp{0-9}as3cf_items table that exists, likewise, the Postmeta query should be run for every wp{0-9}_postmeta table that exists.

Items Custom Table

Since WP Offload Media 2.3 the plugin has used a custom as3cf_items table for recording offload data for Media Library items. If you successfully ran the “Remove Files” tool then this table should be empty and can be safely deleted. Otherwise you should probably inspect the data to make sure you’re happy to remove the table.

DROP table wp_as3cf_items;

Alternatively, you could truncate or delete its contents.

Either way, dropping or deleting the records from the custom table will make WP Offload Media forget that any Media Library items have been offloaded.

Options

DELETE FROM wp_options
WHERE option_name = 'tantan_wordpress_s3'
OR option_name LIKE 'as3cf_%'
OR option_name LIKE 'as3cfpro_%'
OR option_name LIKE 'wpos3_%'
OR option_name LIKE 'amazonS3_%'
OR option_name = 'amazon_s3_and_cloudfront_version'
OR option_name = 'amazon_s3_and_cloudfront_pro_version';

Please note, the above LIKE clauses will also remove records related to both the old Assets addon and Assets Pull addon. If this is of concern then please use a select statement to find records not referenced in the later examples of options table deletes for the Assets and Assets Pull addons, and delete only them.

Postmeta

DELETE FROM wp_postmeta
WHERE meta_key LIKE 'amazonS3_%'
OR meta_key LIKE 'as3cf_%'
OR meta_key LIKE 'wpos3_%';

Transients

DELETE FROM wp_options
WHERE option_name LIKE '%transient_as3cf%'
OR option_name LIKE '%transient_timeout_as3cf%'
OR option_name LIKE '%transient_wpos3%'
OR option_name LIKE '%transient_timeout_wpos3%';

Usermeta

DELETE FROM wp_usermeta
WHERE meta_key = 'as3cf_notices'
OR meta_key = 'as3cf_dismissed_notices'
OR meta_key = 'as3cfpro-dismiss-licence-notice';

Bucket Files

With WP Offload Media you can use the built in tools to remove the Media Library files from cloud storage. However, if you can’t use those tools or are using the Lite plugin you’ll need to manually remove the files from the bucket.

Using the AWS console, DigitalOcean Panel, GCP Console or another method of managing your bucket, remove the Media Library files, which by default reside in the wp-content/uploads path.

Assets Pull Addon

Simply deactivating and deleting the plugin is enough to ensure all WordPress assets are served from the local server. However, you may perform the following additional steps to ensure the Assets Pull Addon is completely removed.

Database Cleanup

Run the following queries via the CLI or using a tool such as phpMyAdmin. Remember to substitute wp_ with your database prefix.

For multisite installs you should run both queries on the wp_sitemeta table.

Options

DELETE FROM wp_options
WHERE option_name = 'as3cf_assets_pull'
OR option_name = 'as3cf_assets_addon_activation';

Transients

DELETE FROM wp_options
WHERE option_name LIKE '%transient_as3cf_assets_pull_%'
OR option_name LIKE '%transient_timeout_as3cf_assets_pull_%';

Amazon Web Services (Deprecated)

If you defined your AWS access keys via the wp-config.php file you do not need to do anything more than deactivate and delete the plugin. If you entered your AWS access keys via the WordPress dashboard you may perform the following additional step to ensure all data is completely removed.

Database Cleanup

Run the following query via the CLI or using a tool such as phpMyAdmin. Remember to substitute wp_ with your database prefix.

For multisite installs you should run the following query on the wp_sitemeta table.

Options

DELETE FROM wp_options
WHERE option_name = 'aws_settings';

Assets Addon (Deprecated)

Simply deactivating and deleting the plugin is enough to ensure all WordPress assets are served from the local server. However, you may perform the following additional steps to ensure the Assets Addon is completely removed.

Before Deactivating (Optional)

If possible, it’s a good idea to turn off the Copy & Serve setting, save the changes, and then use the “Purge” button to remove all Assets files from S3 before deactivating the Assets addon. This will clean up all the Asset addon data in your database.

Crons

Using a plugin such as WP Crontrol ensure the following cron events have been removed:

  • as3cf_assets_scan_files_for_s3_cron
  • as3cf_assets_process_files_for_s3_cron

Database Cleanup

Run the following queries via the CLI or using a tool such as phpMyAdmin. Remember to substitute wp_ with your database prefix.

For multisite installs you should run both queries on the wp_sitemeta table.

Options

DELETE FROM wp_options
WHERE option_name = 'as3cf_assets'
OR option_name = 'as3cf_assets_files_to_process'
OR option_name = 'as3cf_assets_enqueued_scripts'
OR option_name = 'as3cf_assets_location_versions'
OR option_name = 'as3cf_assets_upgrade_session'
OR option_name = 'as3cf_assets_failures'
OR option_name = 'as3cf_constant_WPOS3_ASSETS_SETTINGS'
OR option_name LIKE 'as3cf_assets_files%'
OR option_name LIKE 'wpos3_process-assets_batch_%';

Transients

DELETE FROM wp_options
WHERE option_name LIKE '%transient_as3cf-assets%'
OR option_name LIKE '%transient_timeout_as3cf-assets%';

S3 Files

Using the AWS console or another S3 browser remove the core, plugins and themes directories.