title: How to preserve themes/plugins when autoscaling Wordpress instances
body: <p>Forgive me if this is an obvious question, but I am trying to figure out what the best way is of handling autoscaling of EC2 instances running WordPress such that their <strong>themes</strong> and <strong>plugins</strong> (along with their associated configurations) are preserved.</p>
  
  <p>I am already able to decouple the data and content layers via RDS and S3, respectively, but I am struggling how to preserve the themes and plugins through an EC2 instance autoscaling event.</p>
  
  <p>My EC2 instances are configured as follows:</p>
  
  <ul>
  <li>EC2 bootstrap script installs WordPress onto blank Amazon Linux AMI</li>
  <li>EC2 runs behind an ELB</li>
  <li>Database is on RDS </li>
  <li>Web content is on S3 (using W3 Total Cache plugin)</li>
  <li>Plugins/themes are installed on the local EC2 filesystem</li>
  </ul>
  
  <p>To preserve themes and/or plugins through an EC2 autoscaling event, I could:</p>
  
  <ol>
  <li><p>Install the themes/plugins I need first, then upload the /wp-content/plugins and /wp-content/themes dirs to <strong>S3</strong>, downloading them automatically each time an EC2 instance restarts via the bootstrap script. DISADVANTAGES: need to update S3 every time i make a config change, not all plugins are installed neatly within the /themes subdir, and changes to one instance don't flow to all (need to restart the cluster everytime a change is made).</p></li>
  <li><p>Install the themes/plugins I need first, then take an <strong>AMI</strong> snapshot of the entire instance. Use this AMI as a template when launching new instances. DISADVANTAGES: need to update the AMI every time i make a config change (seems tiresome), and changes to one instance don't flow to all.</p></li>
  <li><p>Create a symbolic link out of the /wp-content/plugins and /wp-content/themes dirs, pointing to an <strong>EFS</strong> filesystem that is mounted on all EC2 instances. DISADVANTAGES: EFS can be a bit slow, not all plugins are installed entirely within the /themes subdir.</p></li>
  </ol>
  
  <p>Anybody have any experience with this? Am I over-engineering this? Perhaps the themes/plugin files don't really change much throughout the lifespan of your WordPress blog (ie, once you're set up, you don't really find yourself changing them much), in which case maybe Option 1 (zip to S3 and download via bootstrap script) is the best option for me, and Option 3 (EFS) is over-engineered. </p>
  
  <p>I would love to get your take on this if you have experience with this conundrum!</p>
  
  <p>Thanks in advance!</p>