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:

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.

1 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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.