0

I'm trying to configure Wordpress using AWS. Right now, this is what I have:

  • EC2

    2 t2.small servers (Wordpress is in both of them)

    ELB configured and working with those 2 servers

  • RDS with the database (both Wordpress are pointing here)

It might be a silly doubt, but I want to configure them making them have the same information in both servers (e.g.: right now, there are images in one server that doesn't exist in the other). I also want to update plugins all at once, not having to enter in every instance to update them.

As far as I know, I have to set up a S3 for all the images and such, but I'm concerned about the plugins. Could you give me some advice on how to do that?

Thanks in advance.

[EDIT] Thank you so much. I think I'll try as the user @tex suggested, I think it's the easiest thing to do and I think I won't have much problem. Thanks to everyone who helped.

monzon8
  • 11
  • 1

3 Answers3

2

Look at Amazon CloudFormation, it has a template that helps with this. You could also use EFS, elastic file store, for a shared file system. Put Wordpress, including all plugins and media on a shared EFS drive so both servers have access to it. There's a chance that if both servers try to change things in a conflicting way there'll be problems, but I suspect it'll be ok. If you do this keep good, regular backups of the EFS drive.

Your question is extremely broad, and I wouldn't be surprised if it's closed for being broad or opinion based. You should really research this yourself and come back if you have further problems.

Tim
  • 31,888
  • 7
  • 52
  • 78
0

As far as my experience with WordPress goes this is very hard to do. Maybe impossible (depends on how much you want to hack on WP).

As you pointed out the problem are the modifications WP does to local files. Maybe your best bet would be to use exactly one ELB, one bigger EC2 for WordPress and a reasonably sized RDS instance for the DB.

I bet you save yourself much time and hassle with that. Maybe you can mount an EFS volume onto the EC2 instance, put WordPress there and configure an AutoScaling group with fixed size of one to guard against instance failures.

tex
  • 889
  • 1
  • 9
  • 19
-1

S3 will help you distribute the media content (as far as you use a plugin for this and ideally a subdomain like static.mydomain.com) "outside" of the infrastructure, to your end users: they will download css/js/img needen for the browser to build the page from nearest s3 end point to them. Instead, what you want to syncronize media (wp-content mainly) is a mechanims able to replicate file changes across all your VMs. This can be achieved from old school cron+rsync to distribued storage like gluster. I suggest you follow the K.I.S.S methodology and start from vary basic cron+rsync. Good luck

x86fantini
  • 302
  • 1
  • 3
  • 9
  • S3 works pretty well, actually, for multi-server WP sites. There are plugins that'll put the wp-uploads stuff on S3 instead. – ceejayoz Sep 22 '16 at 16:13