SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
1 
Make WordPress Fly with Virtual Server Hosting 
Vladimir Lasky 
http://wpexpert.com.au/ 
WordCamp Sydney 2014
2 
Is This For Me? 
Sick of waiting for WP admin pages and edit screens to load in your browser? 
Tired of wrangling with page caches, object caches and minifying plugins? 
Running a database-intensive WordPress site, e.g. e- commerce site? 
Prepared to roll up your sleeves to get a better experience? 
Brave enough to forego the “walled garden” of a cPanel in exchange for true freedom and flexibility? 
Then YES!
Shared Web Hosting 
3
4 
How Shared Web Hosting Limits You 
Throttling of Resources 
–Network bandwidth 
–Running Processes 
–Disk I/O 
Limited ability to tune & reconfigure services 
No PHP Opcode caching 
Might have MySQL query caching enabled, but likely overcommitted
5 
Why Caching Plugins Are Not The Answer - 1 
Two main categories of caching plugins: 
–Page caching (e.g. WP Super Cache, Hyper Cache) 
–Object Caching 
These have cache invalidation overhead/delays 
–When the underlying data changes, caches must be explicitly purged or one must wait for expiry. 
–Purging, rebuilding caches causes performance hit – especially if the cached data is stored on disk 
–Stale caches cause non-current information to be displayed 
–Frequently cause issues with plugins/dynamic pages
6 
Why Caching Plugins Are Not The Answer - 2 
They provide no help in speeding up the backend (WordPress Admin) and usually do nothing for users who are logged in.
7 
What About Cloudflare? 
A very popular Reverse-Proxy/CDN service 
Some useful features, but you are dependent on them 
Have a “free” plan, but no guarantee it will stay free 
CDN based on object pull, so can have cache invalidation issues 
Doesn’t speed up backend (WordPress Admin) 
More comments on CDNs later
8 
What About Minifying Plugins? 
These aggregate your site’s CSS and JS files and compress them by removing white space, new lines comments and block delimiters. 
Examples: 
–Better WordPress Minify 
–Autoptimize 
Somewhat reduce the total requests required to load your site and the amount of data transferred 
Good in theory, but in practice often break things and require much tweaking to work right
9 
Why Host WordPress on a VPS? 
You can use PHP Opcode Caches, MySQL Query Caches and other performance enhancers that don’t have these issues 
You have the full ability to customise and tune services for performance
10 
What is a VPS? 
A Virtual Private Server (VPS) is your very own virtual machine (VM) running in a datacentre. 
The physical server or Virtual Server Host, will be running multiple VMs simultaneously – yours and other clients of your hosting provider, but only yours is visible to you. 
Cost depends on desired specs – e.g. RAM, disk space, CPUs, monthly data traffic 
Start from as little as $5/month, but can be hundreds for something hefty
11 
How Do You Administer a VPS? 
A Linux VPS is generally accessed via SSH 
A Windows VPS is generally accessed via RDP 
Usually there is a facility to view and control the virtual console, e.g. if the VM hangs and needs to be reset or reimaged. 
You can install and run anything you want (subject to provider’s Acceptable Use Policy)
12 
Common Virtual Private Server Types 
OpenVZ 
–Based on containerization 
–Efficient, but does not allow users to change OS kernel version or have dedicated swap space 
–Usually offered at lower price 
Xen 
–Full ability to customise all aspects of VM configuration 
–Allows dedicated swap space 
–Some performance overhead 
–Usually more expensive
13 
Why Hosting Control Panels Are Evil 
Take over your system – very hard to get rid of or change 
Commercial ones cost money, e.g. $150/yr for cPanel 
Free ones could be abandoned at any time. Risk of security holes. 
Are rather inflexible – you have to wait for updates to support/take advantage of new features in other packages
14 
The Plan 
Host WordPress on a Pure SSD VPS with CentOS 6.5 x64. Dual CPUs and 2GB RAM is nice. 
Install a PHP Opcode Cache and allocate 120MB RAM 
–Choose Zend Optimizer if using PHP 5.5 w/single WordPress installation 
–If Multiple Sites or Older PHP, then XCache 
In MySQL config file, enable the Query Cache and allocate 32MB RAM. Make the key buffer/buffer pool 
Configure Apache to launch PHP-FPM in FastCGI mode and communicate using Unix Sockets 
Configure WordPress to access MySQL using Unix Sockets
15 
Our Performance-Enhanced Configuration
Common Shared Hosting Configuration 
16
17 
Differences from a Default Installation 
PHP operates as a standalone service (PHP- FPM) instead of as an Apache module (mod_php) 
Apache communicates with PHP-FPM using Unix Sockets instead of TCP sockets 
A PHP Opcode Cache is installed 
The MySQL Query cache is enabled 
WordPress DB_HOST in wp-config.php is set to ‘localhost’
18 
Benefits of Our Approach 
Not radically different from a default install 
Excellent “bang for buck” 
No cache invalidation problems 
No plugin incompatibilities 
Everyone sees the most current state of your site 
Logged in users and people working in the backend will enjoy a speed increase
19 
Why CentOS? 
Free Linux distribution 100% compatible with Redhat Enterprise Linux – popular Linux distribution designed for servers 
Offered by the vast majority of hosting providers 
Security patches are released speedily 
Experts are abundant
20 
Why Unix Sockets? 
Less overhead – avoids all network layers below transport 
Lessens risk of ephemeral port exhaustion if site is bombarded with requests (it does happen) 
More secure – they only accept connections from localhost
21 
Why Pure SSD VPS Hosting? 
HDDs respond to random I/O like busy elevator in office block – big slowdown when lots of random requests 
SSDs like elevator that teleports to any floor – cope far better with high, random I/O loads 
All server files and databases stored on Solid State Drives 
Greatly improves efficiency, performance of Shared and Virtual Server Hosting 
Beware of “SSD-cached” storage – not as good
22 
Who Provides Pure SSD Virtual Server Hosting? 
Hosted Abroad: 
–Linode 
–DigitalOcean 
Hosted in Australia: 
–Exigent 
–Crucial 
–ServerMule 
–VPSBlocks 
More companies are introducing Pure SSD solutions 
Australian Pure SSD VPS hosts more expensive and offer lower data limits, but “there’s no place like home”.
23 
PHP Opcode Caches - I 
The only way to truly make WordPress run faster 
WordPress is a PHP program 
When PHP code is first executed, it is compiled into bytecode and stored in shared memory 
Future requests will avoid parsing and disk I/O overhead 
120MB is rough yardstick
24 
PHP Opcode Caches - II 
Zend Opcache 
–Bundled with PHP 5.5 
XCache 
–Not as fast as Zend Opcache 
+ Recognises identical copies of PHP files 
+ Saves lots of RAM if you have multiple WordPress sites
25 
MySQL Query Cache 
WordPress and plugins sends many identical SQL queries to the server each time a page loads 
MySQL can be configured to cache the results, avoiding the need to parse and execute the query 
The Query Cache is automatically invalidated whenever the database is updated 
Transparent to WordPress and plugins 
32-64MB is a useful size
26 
Avoiding CDN Hassles 
If you use a CDN for your images, videos or other assets, ensure that it is configured to operate in “Origin Push” mode 
This means that WordPress will upload content to the CDN whenever it is added or updated 
This avoids cache invalidation issues 
W3 Total Cache plugin supports Origin Push CDN integration for several CDNs, e.g. Amazon, MaxCDN
27 
Anything Else To Speed Things Up? 
Enable the Apache module mod_deflate to compress HTML, text, CSS and JavaScript source files before they are sent to the client. 
This speeds up site loading and reduces the amount of data transferred. 
This will work on your current shared host as well!
28 
Virtual Server Security Tips - 1 
Long 20-character true random passwords (use KeePass to generate and store them) 
Regularly apply CentOS software/security updates 
–Single command: “yum update -y” 
Configure firewall using iptables, to only permit traffic from authorised ports 
Install Fail2ban, bfd or similar brute-force attack prevention system 
Appropriate WordPress Security measures (refer to previous presentations)
29 
Virtual Server Security Tips - 2 
Be able to “abandon ship” - keep DNS/Email on separate server, so you can relocate if your server is ever compromised (p0wned) 
Reminder - only UNIX domain sockets for comms between Apache <-> PHP-FPM and WordPress <-> MySQL 
Perform file transfer to/from server using SCP (operates over SSH) 
Alternatively, install Pure-FTPD w/SSL to support FTPS
30 
Too Much Hassle! Is There An Easier Way? 
Get someone else to set it up and/or do periodic maintenance 
Many Virtual Host providers offer a Virtual Server management service for an extra monthly fee 
You can also contact SAGE-AU - Australia’s peak body for System Administration Professionals. They can help you find a local Aussie for casual SysAdmin work: 
–https://www.sage-au.org.au/contact-us
31 
Conclusion 
Additional Tips & Configuration Notes: 
–http://wpexpert.com.au/wordcamp-sydney-2014 
–Will have configuration examples for PHP-FPM, Apache and MySQL 
Questions and Comments: 
–http://wpexpert.com.au/contact-us/

Contenu connexe

Tendances

Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonChris Olbekson
 
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...Acquia
 
WordPress MU 101
WordPress MU 101WordPress MU 101
WordPress MU 101Pete Mall
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sitesJason Yingling
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPressMikel King
 
Word Press Security
Word Press SecurityWord Press Security
Word Press SecurityRandall Rode
 
High Performance Sites with Drupal and Cache Control Module
High Performance Sites with Drupal and Cache Control ModuleHigh Performance Sites with Drupal and Cache Control Module
High Performance Sites with Drupal and Cache Control ModuleExove
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingColdFusionConference
 
Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.AOE
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheColdFusionConference
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And ScalabilityJason Ragsdale
 
Advanced Web Hosting
Advanced Web HostingAdvanced Web Hosting
Advanced Web HostingOVHcloud
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh thingsMarcus Deglos
 
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014Amazon Web Services
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...ColdFusionConference
 

Tendances (19)

S903 palla
S903 pallaS903 palla
S903 palla
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
 
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
Varnish and Drupal- Accelerating Website Performance and Flexibility with Var...
 
WordPress MU 101
WordPress MU 101WordPress MU 101
WordPress MU 101
 
Apache Web Server Setup 1
Apache Web Server Setup 1Apache Web Server Setup 1
Apache Web Server Setup 1
 
CFML Sessions For Dummies
CFML Sessions For DummiesCFML Sessions For Dummies
CFML Sessions For Dummies
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
 
High performance WordPress
High performance WordPressHigh performance WordPress
High performance WordPress
 
Word Press Security
Word Press SecurityWord Press Security
Word Press Security
 
High Performance Sites with Drupal and Cache Control Module
High Performance Sites with Drupal and Cache Control ModuleHigh Performance Sites with Drupal and Cache Control Module
High Performance Sites with Drupal and Cache Control Module
 
Accelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using CachingAccelerate your ColdFusion Applications using Caching
Accelerate your ColdFusion Applications using Caching
 
Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
Advanced Web Hosting
Advanced Web HostingAdvanced Web Hosting
Advanced Web Hosting
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011
 
Performance all teh things
Performance all teh thingsPerformance all teh things
Performance all teh things
 
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 

En vedette

Career Advice Pecha Kucha for TWU Grads
Career Advice Pecha Kucha for TWU GradsCareer Advice Pecha Kucha for TWU Grads
Career Advice Pecha Kucha for TWU GradsSumeet Moghe
 
ThoughtWorks University - the evolution
ThoughtWorks University - the evolutionThoughtWorks University - the evolution
ThoughtWorks University - the evolutionSumeet Moghe
 
New Unity Schedule
New Unity ScheduleNew Unity Schedule
New Unity ScheduleGary Gangnes
 
การทำรายการอ้างอิงด้วย Open Source Reference Manager : Zotero
การทำรายการอ้างอิงด้วย  Open Source Reference Manager : Zoteroการทำรายการอ้างอิงด้วย  Open Source Reference Manager : Zotero
การทำรายการอ้างอิงด้วย Open Source Reference Manager : ZoteroSatapon Yosakonkun
 
PMB 203 Apa dan Siapa Entrepreneur
PMB 203 Apa dan Siapa EntrepreneurPMB 203 Apa dan Siapa Entrepreneur
PMB 203 Apa dan Siapa EntrepreneurNur Agustinus
 
Kiat bekerja di tempat baru
Kiat bekerja di tempat baruKiat bekerja di tempat baru
Kiat bekerja di tempat baruNur Agustinus
 
Barcode Use in Fairs 04-10-2012
Barcode Use in Fairs 04-10-2012Barcode Use in Fairs 04-10-2012
Barcode Use in Fairs 04-10-2012sbasgall
 
Digital learners & edmodo
Digital learners & edmodoDigital learners & edmodo
Digital learners & edmodoNur Agustinus
 
Majalah INFO-UFO no 11
Majalah INFO-UFO no 11Majalah INFO-UFO no 11
Majalah INFO-UFO no 11Nur Agustinus
 
Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Vlad Lasky
 
Feedback Models Handout-3 from Dream Team Webinar
Feedback Models Handout-3 from Dream Team WebinarFeedback Models Handout-3 from Dream Team Webinar
Feedback Models Handout-3 from Dream Team Webinarguestbc85d0
 
Personalisation top trumps cards
Personalisation top trumps cardsPersonalisation top trumps cards
Personalisation top trumps cardsKeren Mills
 
Science and Technology All Around Us
Science and Technology All Around UsScience and Technology All Around Us
Science and Technology All Around UsSatapon Yosakonkun
 
หลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการ
หลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการหลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการ
หลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการSatapon Yosakonkun
 
Social Media Webinar Slides 170908
Social Media Webinar Slides 170908Social Media Webinar Slides 170908
Social Media Webinar Slides 170908guestbc85d0
 
Social Entrepreneurship (introduction)
Social Entrepreneurship (introduction)Social Entrepreneurship (introduction)
Social Entrepreneurship (introduction)Nur Agustinus
 
News From DrupalCon DC
News From DrupalCon DCNews From DrupalCon DC
News From DrupalCon DCJaza
 
Upcoming Unity Schedule
Upcoming Unity ScheduleUpcoming Unity Schedule
Upcoming Unity ScheduleGary Gangnes
 

En vedette (20)

Career Advice Pecha Kucha for TWU Grads
Career Advice Pecha Kucha for TWU GradsCareer Advice Pecha Kucha for TWU Grads
Career Advice Pecha Kucha for TWU Grads
 
ThoughtWorks University - the evolution
ThoughtWorks University - the evolutionThoughtWorks University - the evolution
ThoughtWorks University - the evolution
 
New Unity Schedule
New Unity ScheduleNew Unity Schedule
New Unity Schedule
 
การทำรายการอ้างอิงด้วย Open Source Reference Manager : Zotero
การทำรายการอ้างอิงด้วย  Open Source Reference Manager : Zoteroการทำรายการอ้างอิงด้วย  Open Source Reference Manager : Zotero
การทำรายการอ้างอิงด้วย Open Source Reference Manager : Zotero
 
PMB 203 Apa dan Siapa Entrepreneur
PMB 203 Apa dan Siapa EntrepreneurPMB 203 Apa dan Siapa Entrepreneur
PMB 203 Apa dan Siapa Entrepreneur
 
Kiat bekerja di tempat baru
Kiat bekerja di tempat baruKiat bekerja di tempat baru
Kiat bekerja di tempat baru
 
Barcode Use in Fairs 04-10-2012
Barcode Use in Fairs 04-10-2012Barcode Use in Fairs 04-10-2012
Barcode Use in Fairs 04-10-2012
 
Digital learners & edmodo
Digital learners & edmodoDigital learners & edmodo
Digital learners & edmodo
 
Majalah INFO-UFO no 11
Majalah INFO-UFO no 11Majalah INFO-UFO no 11
Majalah INFO-UFO no 11
 
Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011Securing Your WordPress Website - WordCamp GC 2011
Securing Your WordPress Website - WordCamp GC 2011
 
Feedback Models Handout-3 from Dream Team Webinar
Feedback Models Handout-3 from Dream Team WebinarFeedback Models Handout-3 from Dream Team Webinar
Feedback Models Handout-3 from Dream Team Webinar
 
Personas 2009
Personas 2009Personas 2009
Personas 2009
 
Personalisation top trumps cards
Personalisation top trumps cardsPersonalisation top trumps cards
Personalisation top trumps cards
 
Science and Technology All Around Us
Science and Technology All Around UsScience and Technology All Around Us
Science and Technology All Around Us
 
หลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการ
หลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการหลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการ
หลักเกณฑ์การเก็บรักษาข้อมูลจราจรทางคอมพิวเตอร์ของผู้ให้บริการ
 
Social Media Webinar Slides 170908
Social Media Webinar Slides 170908Social Media Webinar Slides 170908
Social Media Webinar Slides 170908
 
Social Entrepreneurship (introduction)
Social Entrepreneurship (introduction)Social Entrepreneurship (introduction)
Social Entrepreneurship (introduction)
 
News From DrupalCon DC
News From DrupalCon DCNews From DrupalCon DC
News From DrupalCon DC
 
Feedback
FeedbackFeedback
Feedback
 
Upcoming Unity Schedule
Upcoming Unity ScheduleUpcoming Unity Schedule
Upcoming Unity Schedule
 

Similaire à Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014

Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...WordCamp Harare
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentationArun Janarthanan
 
Rock Solid WordPress
Rock Solid WordPressRock Solid WordPress
Rock Solid WordPressErik Osterman
 
Advantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingAdvantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingLisa Clarke
 
High Performance Wordpress
High Performance WordpressHigh Performance Wordpress
High Performance WordpressGareth Davies
 
Veeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and TricksVeeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and TricksVeeam Software
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksAmit Gatenyo
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesExove
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sitesdrupalcampest
 
Setting up a local WordPress Environment
Setting up a local WordPress EnvironmentSetting up a local WordPress Environment
Setting up a local WordPress EnvironmentChris La Nauze
 
HotLink DR Express
HotLink DR ExpressHotLink DR Express
HotLink DR Expressdean1609
 
South jersey sql virtualization
South jersey sql virtualizationSouth jersey sql virtualization
South jersey sql virtualizationJoseph D'Antoni
 
Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Aidan Finn
 
WindowsAzureSDK1.7
WindowsAzureSDK1.7WindowsAzureSDK1.7
WindowsAzureSDK1.7Saravanan G
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Justin Foell
 

Similaire à Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014 (20)

Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
Site Speed = Success – Optimising WordPress from the Server Up - Presented by...
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
 
Rock Solid WordPress
Rock Solid WordPressRock Solid WordPress
Rock Solid WordPress
 
Advantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingAdvantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed Hosting
 
High Performance Wordpress
High Performance WordpressHigh Performance Wordpress
High Performance Wordpress
 
Veeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and TricksVeeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and Tricks
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Setting up a local WordPress Environment
Setting up a local WordPress EnvironmentSetting up a local WordPress Environment
Setting up a local WordPress Environment
 
HotLink DR Express
HotLink DR ExpressHotLink DR Express
HotLink DR Express
 
Caching 101
Caching 101Caching 101
Caching 101
 
Del 1
Del 1Del 1
Del 1
 
South jersey sql virtualization
South jersey sql virtualizationSouth jersey sql virtualization
South jersey sql virtualization
 
Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010Private Cloud Academy: Backup and DPM 2010
Private Cloud Academy: Backup and DPM 2010
 
WindowsAzureSDK1.7
WindowsAzureSDK1.7WindowsAzureSDK1.7
WindowsAzureSDK1.7
 
Sql saturday dc vm ware
Sql saturday dc vm wareSql saturday dc vm ware
Sql saturday dc vm ware
 
Web Werks Cloud Hosting FAQ
Web Werks Cloud Hosting FAQWeb Werks Cloud Hosting FAQ
Web Werks Cloud Hosting FAQ
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 

Dernier

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Make WordPress Fly With Virtual Server Hosting - WordCamp Sydney 2014

  • 1. 1 Make WordPress Fly with Virtual Server Hosting Vladimir Lasky http://wpexpert.com.au/ WordCamp Sydney 2014
  • 2. 2 Is This For Me? Sick of waiting for WP admin pages and edit screens to load in your browser? Tired of wrangling with page caches, object caches and minifying plugins? Running a database-intensive WordPress site, e.g. e- commerce site? Prepared to roll up your sleeves to get a better experience? Brave enough to forego the “walled garden” of a cPanel in exchange for true freedom and flexibility? Then YES!
  • 4. 4 How Shared Web Hosting Limits You Throttling of Resources –Network bandwidth –Running Processes –Disk I/O Limited ability to tune & reconfigure services No PHP Opcode caching Might have MySQL query caching enabled, but likely overcommitted
  • 5. 5 Why Caching Plugins Are Not The Answer - 1 Two main categories of caching plugins: –Page caching (e.g. WP Super Cache, Hyper Cache) –Object Caching These have cache invalidation overhead/delays –When the underlying data changes, caches must be explicitly purged or one must wait for expiry. –Purging, rebuilding caches causes performance hit – especially if the cached data is stored on disk –Stale caches cause non-current information to be displayed –Frequently cause issues with plugins/dynamic pages
  • 6. 6 Why Caching Plugins Are Not The Answer - 2 They provide no help in speeding up the backend (WordPress Admin) and usually do nothing for users who are logged in.
  • 7. 7 What About Cloudflare? A very popular Reverse-Proxy/CDN service Some useful features, but you are dependent on them Have a “free” plan, but no guarantee it will stay free CDN based on object pull, so can have cache invalidation issues Doesn’t speed up backend (WordPress Admin) More comments on CDNs later
  • 8. 8 What About Minifying Plugins? These aggregate your site’s CSS and JS files and compress them by removing white space, new lines comments and block delimiters. Examples: –Better WordPress Minify –Autoptimize Somewhat reduce the total requests required to load your site and the amount of data transferred Good in theory, but in practice often break things and require much tweaking to work right
  • 9. 9 Why Host WordPress on a VPS? You can use PHP Opcode Caches, MySQL Query Caches and other performance enhancers that don’t have these issues You have the full ability to customise and tune services for performance
  • 10. 10 What is a VPS? A Virtual Private Server (VPS) is your very own virtual machine (VM) running in a datacentre. The physical server or Virtual Server Host, will be running multiple VMs simultaneously – yours and other clients of your hosting provider, but only yours is visible to you. Cost depends on desired specs – e.g. RAM, disk space, CPUs, monthly data traffic Start from as little as $5/month, but can be hundreds for something hefty
  • 11. 11 How Do You Administer a VPS? A Linux VPS is generally accessed via SSH A Windows VPS is generally accessed via RDP Usually there is a facility to view and control the virtual console, e.g. if the VM hangs and needs to be reset or reimaged. You can install and run anything you want (subject to provider’s Acceptable Use Policy)
  • 12. 12 Common Virtual Private Server Types OpenVZ –Based on containerization –Efficient, but does not allow users to change OS kernel version or have dedicated swap space –Usually offered at lower price Xen –Full ability to customise all aspects of VM configuration –Allows dedicated swap space –Some performance overhead –Usually more expensive
  • 13. 13 Why Hosting Control Panels Are Evil Take over your system – very hard to get rid of or change Commercial ones cost money, e.g. $150/yr for cPanel Free ones could be abandoned at any time. Risk of security holes. Are rather inflexible – you have to wait for updates to support/take advantage of new features in other packages
  • 14. 14 The Plan Host WordPress on a Pure SSD VPS with CentOS 6.5 x64. Dual CPUs and 2GB RAM is nice. Install a PHP Opcode Cache and allocate 120MB RAM –Choose Zend Optimizer if using PHP 5.5 w/single WordPress installation –If Multiple Sites or Older PHP, then XCache In MySQL config file, enable the Query Cache and allocate 32MB RAM. Make the key buffer/buffer pool Configure Apache to launch PHP-FPM in FastCGI mode and communicate using Unix Sockets Configure WordPress to access MySQL using Unix Sockets
  • 16. Common Shared Hosting Configuration 16
  • 17. 17 Differences from a Default Installation PHP operates as a standalone service (PHP- FPM) instead of as an Apache module (mod_php) Apache communicates with PHP-FPM using Unix Sockets instead of TCP sockets A PHP Opcode Cache is installed The MySQL Query cache is enabled WordPress DB_HOST in wp-config.php is set to ‘localhost’
  • 18. 18 Benefits of Our Approach Not radically different from a default install Excellent “bang for buck” No cache invalidation problems No plugin incompatibilities Everyone sees the most current state of your site Logged in users and people working in the backend will enjoy a speed increase
  • 19. 19 Why CentOS? Free Linux distribution 100% compatible with Redhat Enterprise Linux – popular Linux distribution designed for servers Offered by the vast majority of hosting providers Security patches are released speedily Experts are abundant
  • 20. 20 Why Unix Sockets? Less overhead – avoids all network layers below transport Lessens risk of ephemeral port exhaustion if site is bombarded with requests (it does happen) More secure – they only accept connections from localhost
  • 21. 21 Why Pure SSD VPS Hosting? HDDs respond to random I/O like busy elevator in office block – big slowdown when lots of random requests SSDs like elevator that teleports to any floor – cope far better with high, random I/O loads All server files and databases stored on Solid State Drives Greatly improves efficiency, performance of Shared and Virtual Server Hosting Beware of “SSD-cached” storage – not as good
  • 22. 22 Who Provides Pure SSD Virtual Server Hosting? Hosted Abroad: –Linode –DigitalOcean Hosted in Australia: –Exigent –Crucial –ServerMule –VPSBlocks More companies are introducing Pure SSD solutions Australian Pure SSD VPS hosts more expensive and offer lower data limits, but “there’s no place like home”.
  • 23. 23 PHP Opcode Caches - I The only way to truly make WordPress run faster WordPress is a PHP program When PHP code is first executed, it is compiled into bytecode and stored in shared memory Future requests will avoid parsing and disk I/O overhead 120MB is rough yardstick
  • 24. 24 PHP Opcode Caches - II Zend Opcache –Bundled with PHP 5.5 XCache –Not as fast as Zend Opcache + Recognises identical copies of PHP files + Saves lots of RAM if you have multiple WordPress sites
  • 25. 25 MySQL Query Cache WordPress and plugins sends many identical SQL queries to the server each time a page loads MySQL can be configured to cache the results, avoiding the need to parse and execute the query The Query Cache is automatically invalidated whenever the database is updated Transparent to WordPress and plugins 32-64MB is a useful size
  • 26. 26 Avoiding CDN Hassles If you use a CDN for your images, videos or other assets, ensure that it is configured to operate in “Origin Push” mode This means that WordPress will upload content to the CDN whenever it is added or updated This avoids cache invalidation issues W3 Total Cache plugin supports Origin Push CDN integration for several CDNs, e.g. Amazon, MaxCDN
  • 27. 27 Anything Else To Speed Things Up? Enable the Apache module mod_deflate to compress HTML, text, CSS and JavaScript source files before they are sent to the client. This speeds up site loading and reduces the amount of data transferred. This will work on your current shared host as well!
  • 28. 28 Virtual Server Security Tips - 1 Long 20-character true random passwords (use KeePass to generate and store them) Regularly apply CentOS software/security updates –Single command: “yum update -y” Configure firewall using iptables, to only permit traffic from authorised ports Install Fail2ban, bfd or similar brute-force attack prevention system Appropriate WordPress Security measures (refer to previous presentations)
  • 29. 29 Virtual Server Security Tips - 2 Be able to “abandon ship” - keep DNS/Email on separate server, so you can relocate if your server is ever compromised (p0wned) Reminder - only UNIX domain sockets for comms between Apache <-> PHP-FPM and WordPress <-> MySQL Perform file transfer to/from server using SCP (operates over SSH) Alternatively, install Pure-FTPD w/SSL to support FTPS
  • 30. 30 Too Much Hassle! Is There An Easier Way? Get someone else to set it up and/or do periodic maintenance Many Virtual Host providers offer a Virtual Server management service for an extra monthly fee You can also contact SAGE-AU - Australia’s peak body for System Administration Professionals. They can help you find a local Aussie for casual SysAdmin work: –https://www.sage-au.org.au/contact-us
  • 31. 31 Conclusion Additional Tips & Configuration Notes: –http://wpexpert.com.au/wordcamp-sydney-2014 –Will have configuration examples for PHP-FPM, Apache and MySQL Questions and Comments: –http://wpexpert.com.au/contact-us/