3. The information contained in this document is confidential and proprietary to YOOX Group
WordPress: Application Strategy on AWS Architecture
Standard setup: single server stateful application
Standard Configuration
Standard WordPress migration
3
Scenario before AWS
4. The information contained in this document is confidential and proprietary to YOOX Group
WordPress: Application Strategy on AWS Architecture
Standard setup: single server stateful application
Standard Configuration
Standard WordPress migration
4
Scenario before AWS
5. The information contained in this document is confidential and proprietary to YOOX Group
Standard setup
5
One application server
One RDBS server
One single running instance of WordPress
Scaling is very difficult
No data redudancy
Disaster recovery may be very slow
Uploaded assets are stored on one single server
6. The information contained in this document is confidential and proprietary to YOOX Group
WordPress: Application Strategy on AWS Architecture
6
Standard setup: single server stateful application
Standard Configuration
Standard WordPress migration
Scenario before AWS
7. The information contained in this document is confidential and proprietary to YOOX Group
Standard Configuration
7
DB Connection
Site URL and Home URL
Cookie Domain
Params are stored inside wp-config.php
Stored inside DB during installation.
Can be overridden by constants inside
config file
Defined inside config file.
Needed to correctly handle cookies based
functionalities (login, sessions etc).
8. The information contained in this document is confidential and proprietary to YOOX Group
WordPress: Application Strategy on AWS Architecture
8
Standard setup: single server stateful application
Standard Configuration
Standard WordPress migration
Scenario before AWS
9. The information contained in this document is confidential and proprietary to YOOX Group
Standard WordPress migration
9
Move code bundle
Move uploaded assets
Reconfigure domains
Core, themes and plugins
Multimedia files
Settings inside DB or through wp-config.php
10. The information contained in this document is confidential and proprietary to YOOX Group
Moving WordPress to the cloud
10
Setup
Wordpress customization
Custom wp-config.php and wp-config.xml
Stateless application: load balancing and assets (S3)
Post deploy action
S3fs
Scenario with AWS
11. The information contained in this document is confidential and proprietary to YOOX Group
Set up (AWS)
11
WordPress is installed onto AWS EB container
AWS EB automatically handles the details of
capacity provisioning, load balancing, scaling,
and application health monitoring
Amazon Relational Database Service (Amazon
RDS) is a web service that makes it easier to set
up, operate, and scale a relational database in
the cloud.
Amazon ElastiCache is a web service that
makes it easy to set up, manage, and scale
distributed in-memory cache environments in the
cloud
WordPress installation remains the same against
an architecture
12. The information contained in this document is confidential and proprietary to YOOX Group
Moving WordPress to the cloud
12
Setup
Wordpress customization
Custom wp-config.php and wp-config.xml
Stateless application: load balancing and assets (S3)
Post deploy action
S3fs
Scenario with AWS
13. The information contained in this document is confidential and proprietary to YOOX Group
WordPress Customization
13
14. The information contained in this document is confidential and proprietary to YOOX Group
Moving WordPress to the cloud
14
Setup
Wordpress customization
Custom wp-config.php and wp-config.xml
Stateless application: load balancing and assets (S3)
Post deploy action
S3fs
Scenario with AWS
15. The information contained in this document is confidential and proprietary to YOOX Group
WordPress customization :: Custom wp-config.php and wp-config.xml
15
For each request wp-config.php loads settings
and configurations stored in wp-config.xml
When all is ready WP will be initialized with right
configurations
The configurations are different for each
environments
wp-config.php takes right configurations against
an environment
WordPress can run among environments without
any change to the DB or variables inside wp-
config.php
16. The information contained in this document is confidential and proprietary to YOOX Group
Moving WordPress to the cloud
16
Setup
Wordpress customization
Custom wp-config.php and wp-config.xml
Stateless application: load balancing and assets (S3)
Post deploy action
S3fs
Scenario with AWS
17. The information contained in this document is confidential and proprietary to YOOX Group
WordPress customization :: Stateless application
17
Load balanced application
Auto scaling policies and ranges
Same WordPress code bundle shared
among multiple instances
The assests are stored onto S3 (Simple
Storage Service)
18. The information contained in this document is confidential and proprietary to YOOX Group
Moving WordPress to the cloud
18
Setup
Wordpress customization
Custom wp-config.php and wp-config.xml
Stateless application: load balancing and assets (S3)
Post deploy action
S3fs
Scenario with AWS
19. The information contained in this document is confidential and proprietary to YOOX Group
WordPress customization :: Post deploy action
19
When deploying your applications, you may want to
customize and configure the software that your
application depends on. These files could be either
dependencies required by the application for example,
additional packages from the yum repository or they could
be configuration files such as a replacement for httpd.conf
to override specific settings that are defaulted by AWS
Elastic Beanstalk. You may also want to customize your
environment resources that are part of your AWS Elastic
Beanstalk environment (e.g., SQS queues, ElastiCache
clusters). For example, you may want to add an Amazon
SQS queue and an alarm on queue depth, or you might
want to add an Amazon ElastiCache cluster.
EB Extension references
S3 bucket is mounted via eb commands
20. The information contained in this document is confidential and proprietary to YOOX Group
Moving WordPress to the cloud
20
Setup
Wordpress customization
Custom wp-config.php and wp-config.xml
Stateless application: load balancing and assets (S3)
Post deploy action
S3fs
Scenario with AWS
21. The information contained in this document is confidential and proprietary to YOOX Group
WordPress customization :: S3 FS (File System)
21
Assets are stored onto S3 bucket
S3 is mounted onto instance
For WordPress the images are stored onto
instance but in the real world the assests
are saved onto S3 bucket
Against multiple instances (one WP per
instance ) the assets remain the same
S3fs allows Linux and Mac OS X to mount
an S3 bucket via FUSE
With FUSE it is possible to implement a fully
functional filesystem in a userspace program
22. The information contained in this document is confidential and proprietary to YOOX Group
We are happy
22
We can no longer say that to have one’s head in the clouds is bad
(Non possiamo più dire che avere la testa tra le nuvole sia negativo)
23. The information contained in this document is confidential and proprietary to YOOX Group
www.yooxgroup.com
BOLOGNA - MILANO - NEW YORK - PARIS - TOKYO - SHANGHAI - HONG KONG
CONTACTS
Experience Tools
Team
experiencetoolssupport@yoox.com
#YOOXlabsTechEvent