Git Product home page Git Product logo

Comments (4)

noogen avatar noogen commented on July 30, 2024

I'm not exactly sure what you want from your question. Example of what you want to do may help?

I'm guessing it's something to do with rewriting of URL. I'm assuming that you want to serve your content off a CDN and your site will be the origin, then you probably want you use a plugin called WP Super Cache.

Most CDN works the same way. You point the CDN to your site as origin, then you use WP Super Cache to rewrite your local URL to your CDN URL.

Or maybe you want to ask question about how to setup rewrite / reverse proxy?

from ajenti-v.

wrrr avatar wrrr commented on July 30, 2024

Thanks for your comment @noogen I really appreciate that. I have been where you point to and just a follow up to maybe clarify what the objective is.

I've read (and worked) for hours in fact using plugins on the site in question and have a (self hosted) cdn working pretty well (without WP Super Cache).

So, I'm confused between rewriting and physical files... I have set up folders in my subdomain where images get uploaded/saved. I have also used several plugins to assist in using the cdn for css and js. I don't think the use of extra plugins is as elegant, and could be streamlined by telling the wp-config file to physcially use the /wp-content and /wp-includes from the cdn and update those folders/files as I work. Unfortunately, the guides I have read to do that consistently break my set up.

I don't expect a ton of help as I always force myself to learn by test test test... but I think there's also the possibility of a "gotcha" moment that I either come to myself or someone else knocks me upside the head with a profound statement....

You can see how it loads on Webpagetest.org here

plugins - cdn enabler, WP CDN Rewrite, jsDelivr, Autoptimize

Thanks again Tom.

from ajenti-v.

noogen avatar noogen commented on July 30, 2024
  1. Most CDN works best with static files (css, js, images, etc...). You should not include any php as there would be negative effect. This mean you should not be doing any kind of weird CDN reference of wp-includes.
    The benefit of CDN is that it take the traffic off your site and fully utilize the client fast connection for simultaneous downloads. If your site is fast enough or too slow, CDN will not have that much impact. http://adamyamada.com/maxcdn-review-improve-site-speed/ https://blog.kissmetrics.com/ecommerce-load-time-hazards/

  2. If you're running multiple sites and want to share code folder. I would not recommend this. The headache of maintaining all different configuration matching different code base is worse than just having them as duplicates. It's better for you to have different code or even run in WordPress multi-site mode.

  3. if you're looking for nginx proxy config. This is how you would create your own CDN. Example: https://gist.github.com/noogen/2374a03d2faf6130f937ba774972a083
    I would recommend more reading on nginx.

  4. If you're looking for location rewrite: http://blog.pixelastic.com/2013/09/27/understanding-nginx-location-blocks-rewrite-rules/
    I would recommend StackPath (formerly MaxCDN). You can use their (EdgeRules™) to do the same thing. StackPath use NGINX in the backend for their CDN and provide a user friendly frontend to help you with NGINX configuration.

As for sharing wp-content, you are better off just referencing the static content files directly from the CDN.

from ajenti-v.

wrrr avatar wrrr commented on July 30, 2024

All that makes good sense thanks Tom. I appreciate the reading links.

The plugin CDN Enabler was the one that has a default of using the /wp-includes folder along with /wp-content. I believe that set up is designed more for KeyCDN account holders since they authored it.

from ajenti-v.

Related Issues (20)

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.