3
3
WordPress is a powerful blogging platform written in PHP. This charm aims to deploy WordPress in a fashion that will allow anyone to scale and grow out
4
4
a single installation.
8
8
This charm is available in the Juju Charm Store, to deploy you'll need at a minimum: a cloud environment, a working Juju installation,
9
9
and a successful bootstrap. Please refer to the [Juju Getting Started](https://juju.ubuntu.com/docs/getting-started.html) documentation before continuing.
22
22
juju expose wordpress
24
## Scaled Down Usage for Personal Use
26
If you're just looking to run a personal blog and want to save money you can run all of this on a single node, here's an entire single node installation from scratch:
29
juju deploy --to 0 wordpress
30
juju deploy --to 0 mysql
31
juju add-relation wordpress mysql
34
This will run everything on one node, however we still have the flexibility to grow horizontally. If your blog gets more traffic and you need to scale:
36
juju add-unit wordpress
38
Since we're omitting the `--to` command Juju will fire up a new dedicated machine for Wordpress and relate it. You can also `remove-unit` when the surge is over and go back to a cheaper one node set up.
42
You can deploy a memcached server and relate it to your WordPress service to add memcache caching. This will
43
automagically install [WP-FFPC](http://wordpress.org/extend/plugins/wp-ffpc/) (regardless of your tuning settings) and configure it to cache
44
rendered pages to the memcache server. In addition to this layer of caching, Nginx will pull directly from memcached bypassing PHP altogether.
45
You could theoretically then turn off php5-fpm on all of your servers and just have Nginx serve static content via memcached (though, you
46
wouldn't be able to access the admin panel or any uncached pages - it's just a potential scenario).
49
juju add-relation memcached wordpress
51
This setup will also synchronize the flushing of cache across all WordPress nodes, making it ideal to avoid stale caches.
53
A small note, when using the Apache2 engine and memcache, all request will still be sent to WordPress via Apache where typical caching
54
procedures will take place and wp-ffpc will render the memcached page.
26
58
This WordPress charm comes with several tuning levels designed to encompass the different styles in which this charm will be used.
30
60
A use case for each tuning style is outlined below:
34
64
The Bare configuration option is meant for those who wish to run the stock WordPress setup with no caching, no manipulation of data,
35
65
and no additional scale out features enabled. This is ideal if you intend to install additional plugins to deal with coordinating
41
71
juju set wordpress tuning=bare
45
75
When running in Single mode, this charm will make every attempt to provide a solid base for your WordPress install. By running in single
46
76
the following will be enabled: Nginx microcache, APC OpCode caching, WordPress caching module, and the ability to sync files via NFS.
53
83
juju set wordpress tuning=single
57
87
If you need to run WordPress on more than one instance constantly, or require scaling out and in on a regular basis, then Optimized is the
58
88
recommended configuration. When you run WordPress under an Optimized tuning level, the ability to install, edit, and upgrade themes and plugins
129
159
Any other value will result in the default (nginx) being used.
161
# Known Limitations and Issues
135
165
At this time WordPress + Memcached don't work on HP Cloud's standard.xsmall. To get around this deploy the WordPress charm with the
136
166
charm to at least a `standard.small`, to do this:
162
192
juju add-unit -n3 wordpress
164
## I want more caching, I want MEMCACH(ED)ING!
166
Why not? We could ALL use more caching. Deploy a memcached server and relate it to your WordPress service to add memcache caching. This will
167
automagically install [WP-FFPC](http://wordpress.org/extend/plugins/wp-ffpc/) (regardless of your tuning settings) and configure it to cache
168
rendered pages to the memcache server. In addition to this layer of caching, Nginx will pull directly from memcached bypassing PHP altogether.
169
You could theoretically then turn off php5-fpm on all of your servers and just have Nginx serve static content via memcached (though, you
170
wouldn't be able to access the admin panel or any uncached pages - it's just a potential scenario).
172
juju deploy memcached
173
juju add-relation memcached wordpress
175
This setup will also synchronize the flushing of cache across all WordPress nodes, making it ideal to avoid stale caches.
177
A small note, when using the Apache2 engine and memcache, all request will still be sent to WordPress via Apache where typical caching
178
procedures will take place and wp-ffpc will render the memcached page.
180
## I don't want to run three different machines for one WP install
182
If you're just looking to run a personal blog and want to save money you can run all of this on a single node, here's an entire single node installation from scratch
185
juju deploy --to 0 wordpress
186
juju deploy --to 0 mysql
187
juju add-relation wordpress mysql
188
juju expose wordpress
190
This will run everything on one node, however we still have the flexibility to grow horizontally. If your blog gets more traffic and you need to scale:
192
juju add-unit wordpress
194
Since we're omitting the `--to` command Juju will fire up a new dedicated machine for Wordpress and relate it. You can also `remove-unit` when the surge is over and go back to a cheaper one node set up.
b'\\ No newline at end of file'
194
# Contact Information
196
## WordPress Contact Information
198
- [WordPress Homepage](http://www.wordpress.org)
199
- [Reporting bugs](http://codex.wordpress.org/Reporting_Bugs) on WordPress itself
b'\\ No newline at end of file'