Coder Social home page Coder Social logo

wordpress-cdn-integration's Introduction

CDN Integration WordPress Plugin

This plugin lets you serve your entire WordPress site through a CDN. Currently the only provider supported is KeyCDN.

Usage

Install this plugin to your /wp-config/plugins/ directory, activeate it, visit the setting page located in the WordPress Admin menu under Settings --> CDN Integration

How can I tell if it is working?

The easiest way to check if your page is being served from a CDN as opposed to your origin server is to check the response headers of your page. You'll want to look for a header set called X-CACHE set to HIT.

How can I flush the cache?

The plugin handles flushing URLs from the CDN when content changes. This is thanks to the various actions WordPress provides when content is changed. You can also manually flush the cache using an included Dashboard widget:

screen shot 2017-01-23 at 12 55 22 am

With the widget you can stay within your own site and flush:

  • Multiple URLs at once (one per line)
  • Multiple Cache Tags (one per line)
  • The entire cache by entering all

You can also flush the cache manually by visiting your CDN provider.

wordpress-cdn-integration's People

Contributors

kingkool68 avatar

Stargazers

Zahed Hossain avatar  avatar Alex Popescu avatar Priya Dhoundiyal avatar Chad Moon avatar  avatar Cesar S Falcão avatar Raam Dev avatar

Watchers

Peter Bowey avatar James Cloos avatar David Schargel avatar  avatar  avatar

Forkers

indikagamage

wordpress-cdn-integration's Issues

Endless redirect if unmapped domain == admin domain

Steps to reproduce on a subdomain multisite install (childsite.example.com):

  1. Set public domain to childsite.com
  2. Set admin domain to childsite.example.com

Need a conditional check to make sure $unmapped_domain != $admin_domain...

if( $this->current_domain == $this->unmapped_domain && $this->unmapped_domain != $this->admin_domain && !$this->is_admin_ajax_request && !$this->is_async_upload_request ) {
            $domain = 'http://' . $this->public_domain;
            if( $this->is_public_ssl ) {
                $domain = set_url_scheme( $domain, 'https' );
            }
            if( is_admin() ) {
                $domain = 'http://' . $this->admin_domain;
                if( $this->is_admin_ssl ) {
                    $domain = set_url_scheme( $domain, 'https' );
                }
            }

            $redirect_url = $domain . $this->get_request_uri();
            wp_redirect( $redirect_url, 301 );
            die();
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.