Documentation

Content Filtering Upgrade

In WP Offload S3 Lite 1.1 and WP Offload S3 1.2 we made improvements to how attachment URLs are saved to the database. Check out the release post, which explains the changes.

The upgrade routine will run quietly in the background, processing a small number of attachments and posts at a time. On larger sites (generally 50,000+ attachments or posts) you may want to increase these limits to speed up the process.

Raise Batch Limits

Before making these changes you should ensure that your server has sufficient memory and isn’t bound by small timeout limits. You should not change these default values if you’re using shared hosting.

Add the following filters to an MU plugin and change the values as required:

function as3cf_update_replace_s3_urls_batch_size( $limit ) {
    return 500; // Maximum attachments per batch. Defaults to 50
}
add_filter( 'as3cf_update_replace_s3_urls_batch_size', 'as3cf_update_replace_s3_urls_batch_size' );

function as3cf_update_replace_s3_urls_time_limit( $limit ) {
    return 30; // Maximum seconds per batch. Defaults to 10
}
add_filter( 'as3cf_update_replace_s3_urls_time_limit', 'as3cf_update_replace_s3_urls_time_limit' );