{"_id":"5856b7017c1dec0f00af06c8","parentDoc":null,"project":"55d22cd53c74062300aee584","user":"57e145a4463a9120006d6e53","category":{"_id":"55f0af8b7dccfc0d00986a08","version":"55d383ac0168850d0073f1da","__v":7,"project":"55d22cd53c74062300aee584","pages":["55f0b01d7dccfc0d00986a09","55f0b47078661c170035e121","56046d6d8d58900d0051eb51","5604814124c9d80d0015506e","5604eb0e7c8e580d0001af7a","56ce840c287eb20b009f9cda","56ced70e8acacb13008147b7"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-09T22:15:39.271Z","from_sync":false,"order":0,"slug":"general","title":"General"},"githubsync":"","version":{"_id":"55d383ac0168850d0073f1da","project":"55d22cd53c74062300aee584","__v":9,"createdAt":"2015-08-18T19:12:44.826Z","releaseDate":"2015-08-18T19:12:44.826Z","categories":["55d383ad0168850d0073f1db","55d383ad0168850d0073f1dc","55d38d25f77e6d0d00b1b179","55f0af8b7dccfc0d00986a08","56047d370c78b00d0039b1c3","560481e1d5c3900d0003e79e","5604849b60d2c40d00deb4ba","56390754aaddb90d00c76018","58867f5fbd44ca1b005d29fd","58ab437f9048311b0089b732"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-18T16:19:13.449Z","link_external":false,"link_url":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"For this tutorial we assume that your WordPress blog is hosted on the root domain, for example yourdomain.com, and you have created a CDN property named cdn.yourdomain.com which points to your blog for its origin.\n\nOne of the things which can be intimidating when attempting to utilize a CDN is how you are going to change all of the links to your content. Luckily, if you are using WordPress, there are a variety of plugins which can handle this for you automatically. This documentation example will assume the use of W3-Total-Cache, but other plugins such as CDN Enabler or WP CDN Rewrite will also work.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Installing the Plugin\"\n}\n[/block]\nThe WordPress Admin Panel contains a menu option to add plugins quickly:\n\nClick on *Install Now* and WordPress will install the plugin for you. Alternatively, If you prefer a manual installation, the plugin can be found at https://wordpress.org/plugins/w3-total-cache/. \n\nNow that the plugin is installed you will need to activate it. Go to the installed plugins page, scroll down to find W3-Total-Cache, and click *Activate*.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Configuration\"\n}\n[/block]\nGo to the settings page for W3-Total-Cache. You can find a link in the admin section sidebar under Installed Plugins. There is an almost overwhelming amount of configurability, but the two sections we are concerned with are the CDN settings on the main page, and the specific CDN settings page. \n\nThe first step is to make sure the CDN feature is disabled and have the type set to ‘Generic Mirror’. \n\nNext, if you look on the left panel, you will see some sub-pages for W3-Total-Cache settings. Select the CDN section.\n\nOn this page you will want to click the following:\n\n* Host attachments\n* Host wp-includes/files\n* Host theme files\n* Host custom files\n\nThen scroll down. Make sure SSL is set appropriately.\n\nWhere it says \"Replace site's hostname with\" you will want to enter the name of your CDN domain.\n\nClick the *Test Mirror* button to test it, and then click *Save* all settings.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Usage\"\n}\n[/block]\nYour website should now be serving static content via BelugaCDN. To test it, view page source in your browser and see that images, js, and css are being served from your CDN domain.\n\nIt should be noted that occasionally, due to how configurable WordPress is, it is possible for there to be a theme which will cause issues. If you have any problems with your page not displaying correctly, try to uncheck \"Host theme files\".\n\nThat's it, you're all set!\n\nStill running into a snag? Contact our technical support team [via ticket](https://my.belugacdn.com/#support/new) and we'll help you out!","excerpt":"","slug":"wordpress-integration","type":"basic","title":"WordPress Integration"}

WordPress Integration


For this tutorial we assume that your WordPress blog is hosted on the root domain, for example yourdomain.com, and you have created a CDN property named cdn.yourdomain.com which points to your blog for its origin. One of the things which can be intimidating when attempting to utilize a CDN is how you are going to change all of the links to your content. Luckily, if you are using WordPress, there are a variety of plugins which can handle this for you automatically. This documentation example will assume the use of W3-Total-Cache, but other plugins such as CDN Enabler or WP CDN Rewrite will also work. [block:api-header] { "type": "basic", "title": "1. Installing the Plugin" } [/block] The WordPress Admin Panel contains a menu option to add plugins quickly: Click on *Install Now* and WordPress will install the plugin for you. Alternatively, If you prefer a manual installation, the plugin can be found at https://wordpress.org/plugins/w3-total-cache/. Now that the plugin is installed you will need to activate it. Go to the installed plugins page, scroll down to find W3-Total-Cache, and click *Activate*. [block:api-header] { "type": "basic", "title": "2. Configuration" } [/block] Go to the settings page for W3-Total-Cache. You can find a link in the admin section sidebar under Installed Plugins. There is an almost overwhelming amount of configurability, but the two sections we are concerned with are the CDN settings on the main page, and the specific CDN settings page. The first step is to make sure the CDN feature is disabled and have the type set to ‘Generic Mirror’. Next, if you look on the left panel, you will see some sub-pages for W3-Total-Cache settings. Select the CDN section. On this page you will want to click the following: * Host attachments * Host wp-includes/files * Host theme files * Host custom files Then scroll down. Make sure SSL is set appropriately. Where it says "Replace site's hostname with" you will want to enter the name of your CDN domain. Click the *Test Mirror* button to test it, and then click *Save* all settings. [block:api-header] { "type": "basic", "title": "3. Usage" } [/block] Your website should now be serving static content via BelugaCDN. To test it, view page source in your browser and see that images, js, and css are being served from your CDN domain. It should be noted that occasionally, due to how configurable WordPress is, it is possible for there to be a theme which will cause issues. If you have any problems with your page not displaying correctly, try to uncheck "Host theme files". That's it, you're all set! Still running into a snag? Contact our technical support team [via ticket](https://my.belugacdn.com/#support/new) and we'll help you out!