• 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 751 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 (24.3K 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

  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023

About This Article

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

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

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

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

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT