TheStanfordDaily / stanforddaily-wordpress

The Stanford Daily backend. Proudly powered by WordPress.
https://www.stanforddaily.com/
8 stars 5 forks source link

Move site to AWS #26

Open epicfaace opened 6 years ago

epicfaace commented 6 years ago

Problem Our site has been hosted by WPEngine since 2012, but it is very slow. It seems like a lot of the slowness is probably caused by WPEngine. They host our server on a shared plan, and it seems like others have faced the same problems with intermittent errors and not-so-good support as Do and I faced all throughout last year.

Solution: Switch to AWS as a hosting provider. This way, we get dedicated hosting space at a cheaper price, which should speed up the site a lot. However, the tech team will need to be able to manage and fix problems themselves, as we won’t have WPEngine to rely on.

This won’t change anything for the end user of the site (people viewing the site or writing articles), except for that it will probably be much faster. Additionally, by managing all the sites ourselves, we will be able to use the Wordpress Multisite feature to share accounts for all our sites (so, someone with a stanforddaily.com account could also log in to the wiki or magazine site with the same account).

Timeline: This would need to be done at a time when no one is using the site for a day or so. Planning to do this on Saturday, Oct 13. After we move the main site over, we can move the subsides (magazine, wiki) over later — but the main site is the first priority.

Pricing: WPEngine: We have a plan for 400k users per month which costs us around $240 per month. AWS: our infrastructure will cost around $100-200 per month; but we get $2500 (I believe) per year for free as a nonprofit, so in the best case our costs should go down to virtually $0.

Technical Details: Current setup (by WPEngine): Wordpress server - managed by WPEngine Wordpress posts - stored in database managed by WPEngine Static content - stored in AWS S3 (simple storage service)

Components of our solution: Wordpress server - AWS EC2 instance Wordpress posts - stored in AWS Database (RDS) Static content - stored in AWS S3 (simple storage service)

Steps

  1. Move the database over to AWS
  2. Point the stanforddaily.com to new website
  3. Make sure static content on WordPress site points to S3
  4. Create a staging and production server
  5. Perform load testing to make sure server can handle traffic, or upgrade it if necessary
  6. Use WordPress multisite to host websites such as magazine.stanforddaily.com, wiki.stanforddaily.com — that way we can share user accounts across all our sites.
  7. Deactivate WPEngine
epicfaace commented 5 years ago

Use cloudfront as a CDN: https://aws.amazon.com/blogs/startups/how-to-accelerate-your-wordpress-site-with-amazon-cloudfront/