Skip to content
WJunction - Webmaster Forum

Cookie Free domain for Wordpress

Status
Not open for further replies.
Hello guys,

Most of the webmasters have been using wordpress these days...
Here is a simple trick that can help your site in performance.

Using a cookie free domain for static contents.

Step 1: Create a sub-domain.. like cdn.yoursite.com or static.yoursite.com.

Step 2: Point the sub-domain to the wp-content directory of wordpress.

Step 3: Edit your wp-config.php file, add the following code

Code:
define("WP_CONTENT_URL", "http://static.yoursite.com");
define("COOKIE_DOMAIN", "www.yoursite.com");
Note: Make sure you use the "bloginfo('template_directory')" to load your static content in theme files.
To get more information about bloginfo.. visit here http://codex.wordpress.org/Function_Reference/bloginfo


Thanks

credits to original poster
 
Status
Not open for further replies.

About the author

D
Active Member · Joined
1,393
Messages
61
Reactions
48
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom