• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » OpenStack Swift (HP Cloud CDN) with WordPress W3TC

By Abhishek Ghosh January 27, 2015 5:52 pm Updated on January 27, 2015

OpenStack Swift (HP Cloud CDN) with WordPress W3TC

Advertisement

We Can Use Python Swift Client to Selective Upload the Static Objects to OpenStack Swift, like in HP Cloud CDN. Here is How to Configure W3TC. W3TC means – W3 Total Cache Plugin. There are few steps involved. First and foremost important thing is that – creating a PHP based Plugin or helper Plugin for WordPress W3TC is not that easy for Key Stone Based Authentication System. Rackspace Cloud uses API, it makes it easy to upload stuffs. However, we have ways for you, primitive, but you can use nicely.

 

OpenStack Swift (HP Cloud CDN) with WordPress W3TC : Initial Upload

 

Previously, we have described how to upload all the things to OpenStack Swift (HP Cloud CDN). You must read it. That is the basic thing for the uploading part. But, uploading in that way, has risk of uploading the core PHP files, even uploading backups in .sql format.

So, you will arrange exactly the same settings but at the point of running commands, you’ll stop. We need to add filter for the file types. We can exclude the .php, .htaccess, .html files in several ways. If your WordPress is installed at /usr/share/nginx/html, then, you can copy to a directory named cdn (or whatever you want to name it) :

Advertisement

---

Vim
1
rsync -av --exclude='*.PHP' --exclude='*.ZIP' --exclude='*.SQL' /usr/share/nginx/html /usr/share/nginx/html/cdn

Now, if cd to that cdn directory and upload all the stuffs, it becomes easier. You can, even exclude the directories to extract files. This is the syntax :

Vim
1
rsync -av --progress /source /destination --exclude exclude-directory-name

Second way to add filter for the file types is using tar :

Vim
1
tar -c --exclude .php --exclude .sql | tar -x -C ~/dest

Yes, cp can do it :

Vim
1
cp !(file1|file1) dest

or

Vim
1
find ./source-directory -not ( -name .php -a -prune ) -print0 | xargs -0 -IFILES cp FILES ./destinationdirectory

But works better as bash script :

Vim
1
2
3
4
5
# add your shell head here
# delete this line, keep second line clean
# sets extended pattern matching
shopt -s extglob  # sets extended pattern matching
cp $(ls -laR !(sub-dir1/file1|file2|sub-dir2/file3)) destination

OpenStack Swift (HP Cloud CDN) with WordPress W3TC

rsyc is the best way. Now cd to that directory and upload to an already published Container created via web GUI control panel. Run swift upload command, as we have shown in the previous guide.

If your instance get hanged or Nginx throws error, during the first time upload, simply reboot the instance from SSH. It happens because some files might be in use!

 

OpenStack Swift (HP Cloud CDN) with WordPress W3TC : W3TC Configuration

 

Set W3TC for Rackspace Cloud Files. We are showing you the options needs to be adjusted :

+ ————————————————————————
+ ————————————————————————
+ General
+ =======
+
+ Host attachments : Checked or Not, depends on your wish
+ Host wp-includes/ files : Checked
+ Host theme files : Checked
+ Host minified CSS and JS files : Checked
+ Host custom files : Checked
+ Force over-writing of existing files : Checked (does not matter)
+ Import external media library attachments : Unchecked
+
+ Configuration
+ =============
+ Username: Use a Fake Name
+ API key: Use a Fake Password
+ Location: [keep it default]
+ Container: Give real container name to remember yourself!
+ SSL support: [Yes for us]
+ Replace site’s hostname with: Paste the whole path like this,
+ this is SSL one, do not append HTTP or HTTPS
+ a248.e.akamai.net/cdn.hpcloudsvc.com/h3c328c03/whoever//wp-content
+
+ Advanced
+ ========
+
+ No need to change anything.
+ ————————————————————————-

Save the settings. It is likely, that you are using Nginx. W3TC will prompt to write this block on Default file (do you know, that W3TC has the option to set path to config file on the General settings page? Change the default value, you’ll get prompt) :

Vim
1
2
3
4
5
# BEGIN W3TC CDN
location ~ \.(ttf|ttc|otf|eot|woff|font.css)$ {
   add_header Access-Control-Allow-Origin "*";
}
# END W3TC CDN

Reload Nginx. Your static contents will be served via HP Cloud CDN / OpenStack Swift Storage.

Tagged With openstack php video cdn

This Article Has Been Shared 297 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to OpenStack Swift (HP Cloud CDN) with WordPress W3TC

  • Hybrid Cloud Computing in Depth

    Hybrid Cloud Computing combines a traditional data center with which the private cloud with scalable cloud services combine to form a public cloud.

  • Optimizing Page Speed of vBulletin for Rackspace Cloud Sites

    Optimizing Page Speed of vBulletin for Rackspace Cloud Sites is hard even by a Page Speed Specialist because not really for Cloud. Still Let us try to optimize.

  • OpenStack Cloud : Now is the Turn of SUSE Linux

    OpenStack Cloud Computing Software can be considered as a cloud infrastructure controller and technically better. SUSE Linux also seems to favor the path.

  • Checklist for SaaS Provider Selection

    Checklist for SaaS Provider Selection is a compiled a checklist to give users the required guidance. A SaaS providers must meet a few basic requirements.

  • iPhone App for Website : Practical Tips and Technical Guide

    iPhone App for website is easy to create and publish, you need a good CDN, a preferably good cloud platform, free resource as template and some tips to start.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (22.1K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Modernizing Your Business With a Hybrid Cloud Strategy May 22, 2022
  • Big Data in Sports May 20, 2022
  • FaaS Versus PaaS Deployment: What You Should Know May 18, 2022
  • What Is A Digital Media Consultancy? May 17, 2022
  • How Artificial Intelligence (AI) Is Changing The Way We Play Bingo May 16, 2022

About This Article

Cite this article as: Abhishek Ghosh, "OpenStack Swift (HP Cloud CDN) with WordPress W3TC," in The Customize Windows, January 27, 2015, May 22, 2022, https://thecustomizewindows.com/2015/01/openstack-swift-hp-cloud-cdn-wordpress-w3tc/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2022 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy