Support » Plugin: W3 Total Cache » V 0.9.3 CDN Cloudfront Error – Empty Access Key

  • I have just updated W3TC to the latest version and while everything appears to be running fine, I get an odd error when I test the Cloudfront distribution using the button in the “Configuration” section of the CDN sub-section on the dashboard.

    When I test it gives the error “Empty Access Key”, despite working fine before and even when I try a different access key and secret key I still have the same problem.

    However, when I check files and images on my site I can clearly see that they are being served correctly from the CDN. Perhaps it is the error message at fault as everything else seems to be functioning perfectly.

    Anyone else with a similar issue or fix?
    (There is a tread for issues with MAXCDN as well:
    with some people reporting a similar issue)

Viewing 15 replies - 1 through 15 (of 30 total)
  • I was/am having the same issue … sort of. I am getting the same error message when testing the configuration.

    I have tided to ‘validate’ the configuration 2 ways.
    (1) AWS>Sect Creds> CloudFront > Access and Secret
    (2) Create User / Group / Permissions via IAM with the AWS Policy Generator.

    However, even though the plugin does not validate the Access Key and Secret Key… CloudFront is serving content for my domain / site. I know this because when viewing the page source in the browser the CNAME configured in Route53 is visible. If you don’t have Route 53 configured with a sub domain for CloudFront you will just see something like

    My guess is that the plugin validation needs to be updated and I wouldn’t worry about the “Empty Access Key’ error if in fact CloudFront is serving content.

    I’m having this exact issue.

    When testing the Cloudfront distribution I receive: “Error: Empty access key.”

    So in the w3tc CDN Configuration settings, under “Origin” I clicked “Create distribution” and it created a new distribution – which I verified by viewing my AWS Cloudfront Distributions dashboard.

    So now I have two distributions in my AWS Dashboard. I disabled my original one and let the new one propagate. I also created a 2nd Access Key ID (with Secret Access Key).

    In the w3tc CDN Configuration settings I input the new Access Key ID and new Secret Access Key. I also entered the new distribution prefix in the field.

    When I test the distribution I still get this message: “Error: Empty access key.” Despite the error the CDN is still serving my page, but here’s the kicker: when I purge the CDN of files (like say a style.css file) it purges/invalidates the OLD CDN distribution – the one I disabled!

    This is the first time I have used CouldFront with this site so I haven’t invalidated anything yet.

    I am curious though… when you view page source which distribution is serving content?

    Thanks for all the responses, good to know I am not alone with this. I have done my fair share of testing too and haven’t come up with anything as of yet.

    @ nasca when I check the page source the CDN is still serving content, but I haven’t tried testing any changes to CSS or adding new images (both served from the CDN) as this is now on a live site (I did test the update on my test site, but didn’t spot this in time…).

    Regrettably I have had to disable my CDN for now within the plugin and relying only on Cloudflare to keep things up to speed. I will give it a day or two and if there is no fix I will revert to the previous version of W3TC as I am out of ideas on how we might fix this short of an update.

    @nasca I have it disabled, but I reenabled it to check and it’s serving the new distribution. It’s worth noting that the display of the new distribution is broken – serving up a plain text version of each article/page – so I have to keep the CDN option disabled in w3tc until a fix comes out.

    I initially setup a cloudfront instance, later because I don’t get expected results, I try both Cloudfront and Cloudflare together… I finally disable my Cloudfront CDN.
    I have the same (even better) results with Cloudflare and it’s free…

    I don’t know if the issue comes from cloufront or using both cloudfront & cloudflare but my GTMetrix and Pingdom results are much better now.

    I’m also having trouble getting Amazon Web Services Cloudfront CDN to work. It used to work. When I test the new suggested IAM configuration, I get this in red: Error: Empty access key.
    This page:
    Has had this statement at the top for well over a year:
    Note: Please use the new page named Your Security Credentials in the AWS Management Console to manage security credentials. AWS will support the current page for a limited time to help during your transition.
    It’s been about a year or more, I think.

    On this page:
    the directions seem still geared toward the old method of using root credentials. Are the directions up to date on how to use IAM policies on this W3 Total Cache FAQ page?


    $config = W3_Request::get_string('config');
    $config = json_decode($config, true);

    w3tc tries to read config as a string, but config is not a JSON encoded array but a PHP array
    it gets “Array” as a value


    $config = W3_Request::get_array('config');
    //            $config = json_decode($config, true);

    Works for me.

    It would be good to have a github repo to have a Pull Request.

    szepe.viktor – your solution worked for me too. Thanks for sharing!

    Having the same issue, the solution offered above didn’t work for me.

    Deactivating W3 Total Cache until further notice.

    Confirmed that does work:

    Starting at line 370 -> 373 use this:

    if (!isset($config['host'])) {
            $config = W3_Request::get_array('config');
            #$config = json_decode($config, true);

    Darn… I was hopeful that this would help resolve this same problem on my site, but to no avail. (I am using S3/Cloudfront.)

    It seems like it is serving from the CDN though, so I will probably leave the plugin active to keep the load off my server, but it would be nice to have a fix.

    Having the same issue with RackSpace CloudFiles. Above solution doesn’t work unfortunately.

    The work around above didn’t work for me either. I still have the Error: Empty hostname / CNAME list. Let me know if anybody have an alternative fix.

    Just chiming in to add that I am having the same issue with both S3 and Cloudfront.

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘V 0.9.3 CDN Cloudfront Error – Empty Access Key’ is closed to new replies.