DZone
Performance Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Performance Zone > Improving WordPress Performance for EC2 Micro Instances

Improving WordPress Performance for EC2 Micro Instances

Daniel Ackerson user avatar by
Daniel Ackerson
·
Jul. 23, 12 · Performance Zone · Interview
Like (0)
Save
Tweet
6.72K Views

Join the DZone community and get the full member experience.

Join For Free
For the price, it’s hard to beat the EC2 Micro instance. But, if you have even a little bit of traffic, don’t expect to run a stock AMI without feeling some performance pain. After migrating this blog, we noticed that being logged in (meaning no wordpress cache hits) literally slowed the server down to a crawl. Just clicking around wp-admin a few times would drive load up to 12-13 and stuck the virtual server in 98%st. Apache connections were tweaked, mysql database settings optimized – traffic was really light (2-3 users) and the damn thing was unreachable! It was time for some PHP acceleration…

W3 Total Cache for WordPress

We switched to W3TC from WP Super Cache over a year ago. Besides offering more caching options (minify of static resources, embedded CDN setup), it’s also possible to use a combination of memcache and opcode caching. Back then, we didn’t have need of such heavy-duty, but it was nice knowing they were just a couple of clicks away.

Fast forward to 2011 – after our well-received devops series, we’ve seen some explosive growth. The continuing problems I described above had to be solved if we were to continue to grow our audience. As this system is a WordPress server, a PHP accelerator seemed the most logical solution.

APC Opcode Caching to the rescue

W3TC recommends APC Opcode caching and our Ubuntu based instance allowed us to easily install it:

apt-get install php-apc

W3TC offers a default configuration which you can append right to the php.ini:
sudo cat /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/w3-total-cache/ini/apc.ini >> /opt/bitnami/php/etc/php.ini
Restart Apache, to register the changes:
sudo /opt/bitnami/ctlscript.sh restart apache

Now, you should see the Opcode selectable in the W3TC options:

We use the “Opcode: APC for caching” setting for Page, Minify and Object caching and leave Database alone (as recommended in the fine print).

After restart, Matthias and I clicked around a bit. Wow, what a difference! Both in the front-end and wp-admin. Whether logged-in or not, the site was noticeably more performant and sluggish clicks in the backend were much snappier. It’s fun again to write posts, manage tags and scour comments for spam!

Professional Grade Virtual Computing for “Free”

    In case you missed my other posts on acquiring, maintaining, backing-up and monitoring your virtual server, here’s the complete list:
  • EC2 setup : Migrate Your WordPress Blog to a Bitnami EC2 Instance
  • Backups : Poor Man’s Automated Snapshots for EC2
  • Monitoring : Cloudkick Monitoring for EC2
AWS WordPress Cache (computing)

Published at DZone with permission of Daniel Ackerson, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • MongoDB vs. DynamoDB Head-to-Head: Which Should You Choose?
  • MEAN vs MERN Stack: Which One Is Better?
  • Top 20 Git Commands With Examples
  • Progressive Delivery With Argo Rollouts: Blue-Green Deployment

Comments

Performance Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo