• 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 » Mount wp-content Directory into RAM Memory (HP Cloud, Nginx)

By Abhishek Ghosh May 3, 2015 11:56 am Updated on May 3, 2015

Mount wp-content Directory into RAM Memory (HP Cloud, Nginx)

Advertisement

Virtual Instances on Bad Quality Hardware Can Die Instead of Performance Boost. We Can Mount wp-content Directory into RAM Memory For Testing. This is quite advanced guide and despite it appears easy, you should take precautions (server snapshot) and know something about recovery. We will mount wp-content directory slow PHP dragged WordPress into RAM Memory sounds so inviting that it is difficult not to do the thing.

 

Mount wp-content Directory into RAM Memory : Understand Mounting

 

We described how to mount swap space on virtual instance. The basic commands are quite closer and our method has basic advantages : Everything will comeback to the previous state if you just reboot.

 

Mount wp-content Directory into RAM Memory (HP Cloud, Nginx)

 

This is popularly known as creating a RAM directory to serve the static cache files and HTML files. Take that we have nginx installed and public FTP root is at /usr/share/nginx/html. First shut down nginx :

Advertisement

---

Vim
1
service nginx stop

If you proxy_cache_path is set to /usr/share/nginx/cache/fcgi, then run these two commands :

Vim
1
2
mount -t tmpfs -o size=1G tmpfs /usr/share/nginx/html/wp-content/cache
mount -t tmpfs -o size=1G tmpfs /usr/share/nginx/cache/fcgi

Start nginx now :

Vim
1
service nginx start

Mount wp-content Directory into RAM Memory

Just like adding swap tutorial, if you want the wp-content to remain even after a reboot (you are not doing this step before testing the above), then edit /etc/fstab and add this line for the above case :

Vim
1
tmpfs /usr/share/nginx/html/wp-content/cache tmpfs defaults,size=1G 0 0

The above is permanent method. You can run df -ah | grep tmpfs or df -k command to check the things. We have taken the screenshot on test server – the screenshot is not of live instance. You should be careful about what you are doing. We are using tmpfs. Both the rams and tmpfs does the same thing with some differences. tmpfs uses swap but ramfs does not use swap. ramfs on physical server is really fast.

We do not recommend to use these on cloud server instances. From our testings, these give inconsistent results. All is basically getting allocated from the disk, so practically the gain is very low on virtual instances.

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 Mount wp-content Directory into RAM Memory (HP Cloud, Nginx)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

  • How to Install WordPress : Ubuntu 16.04, Nginx, PHP7-FPM

    Here is Step by Step Guide on How to Install WordPress on Ubuntu 16.04, Nginx, PHP7-FPM, memcached & Percona MySQL 5.7 on Cloud Server or VPS.

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…

 

vpsdime

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

  • Cloud-Powered Play: How Streaming Tech is Reshaping Online GamesSeptember 3, 2025
  • How to Use Transcribed Texts for MarketingAugust 14, 2025
  • nRF7002 DK vs ESP32 – A Technical Comparison for Wireless IoT DesignJune 18, 2025
  • Principles of Non-Invasive Blood Glucose Measurement By Near Infrared (NIR)June 11, 2025
  • Continuous Non-Invasive Blood Glucose Measurements: Present Situation (May 2025)May 23, 2025
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

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

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