Quick & dirty “CDN” in WordPress

If you want a quick & dirty way to speed up WordPress without any plugins:

  1. create a subdomain in DNS, e.g. static.yourblog.org
  2. add that subdomain as a ServerAlias to your Apache config (remember to restart apache)
  3. add the following to your wp-config.php:
    define('WP_CONTENT_URL','http://static.yourblog.org/wp-content');

If you want to do this the right way; plugins such as WP Super Cache or W3 Total Cache do a much better job at this.

One thought on “Quick & dirty “CDN” in WordPress

  1. Pingback: Code Snippets » 不花分文利用伪CDN加速WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *