WordPress.org

Forums

W3 Total Cache
[resolved] W3TC and S3 - updated URLs in the posts (6 posts)

  1. travisneel
    Member
    Posted 4 years ago #

    First of all, let me say this is a great plugin.

    I've setup the plugin with my S3 account for the CDN and when I add a file to the Media Library, I see it in the S3 bucket fairly immediately. What I'm not sure about is how the URLs in the post get updated with the S3 link. (ie, the img src). Is there any way for that to happen automatically? It seems that if I go into the CDN settings for the plugin and 'Exporting Media Library to CDN', my posts get updated with the correct S3 URLs, but unless I do that, it doesn't seem to get updated.

    Thanks.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Only the page cache file itself is updated with the S3 URL once the attachment is successful updated.

    Are you saying that your media library files are not automatically uploaded anymore? Check the unsuccessful transfer queue on the CDN settings tab.

  3. mattiem
    Member
    Posted 4 years ago #

    This has started happening on three of my sites recently as well. The files are uploaded to the CDN without any problem, but W3TC has stopped rewriting the URL's to point browsers at the CDN version of images. Instead, the images are being pulled off the local server despite having been uploaded to the CDN.

    I haven't changed any settings to cause this problem. All three blogs were configured the same, and one of them is on an independent server.

    You don't need to "export" your whole library to get W3TC to rewrite the urls, it is supposed to do it automatically (and did properly for months for me until recently).

  4. Lucker
    Member
    Posted 4 years ago #

    +1
    I installed plugin several days ago, but changes in the pages (added new images with URLs) not affected links to uploaded (automatically) to CDN image copies. All new links to new images point to local original website (even the image copies exist on CDN).

  5. tagg
    Member
    Posted 4 years ago #

    I am having the same issue. It can be seen in debug mode as

    <!-- W3 Total Cache: CDN debug info:
    Engine: cf
    Replaced URLs:
    https://d28tuvzqyj7vxs.cloudfront.net/wp-content/uploads/2010/11/100114_070-199x300.jpg => https://d28tuvzqyj7vxs.cloudfront.net/2010/11/100114_070-199x300.jpg

    the first url is correct and what appears in my posts, in the WP admin. The second is the url appearing in public posts. Where is the setting that is getting rid of the wp-contents/uploads in the url?

    All of the media library mangement appears to be correct. Images are added and deleted to/from the CDN as needed. When I put an image in a new post, from the media library, the html view of the post has the correct (CDN) url and the above rewriting takes place. This rewriting results in a broken image url.

    If I change settings > media to have "store uploads in this folder" blank and "full URL path to files" blank then I have the above problem. That is media urls are served from my "local" server.

    Any ideas????

    I am using WordPress 3.0.1 and version 0.9.1.3 of W3 Total Cache.

    my .htaccess file looks like:

    AuthUserFile /var/www/.htpasswd
    AuthType Basic
    AuthName "Please Enter Your Username and Password"
    Require valid-user

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Thanks - Tagg

  6. mattiem
    Member
    Posted 4 years ago #

    Frederick fixed this problem on my site. The trouble was that the "Unsuccessful Transfer Queue" was full. Once it's full for some reason W3TC stopped rewriting the URL's properly. By simply emptying this queue, the problem fixed itself.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • W3 Total Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic