In this module, you will create a MySQL database for your WordPress site. Before you create your database, let’s learn why WordPress needs a MySQL database and why Amazon RDS is a good choice for your database needs.
Time to Complete Module: 5 Minutes
WordPress is a flexible content management system for building blogs, e-commerce sites, discussion boards, and more. For whatever kind of website you’re making, you will have content to store. In a blog, this will be your blog posts and comments. In an e-commerce site, it will be your products and user accounts.
This content needs to be permanently stored somewhere. WordPress uses MySQL to store this content. A lot of the data in a WordPress application is hierarchical, structured data. For example, your application may have blog posts which have user-submitted comments. A relational database is a good choice for storing hierarchical data like this. Further, MySQL is the most popular open source database, and it is a reliable, performant choice for this application.
Many installation guides for WordPress use a MySQL database that is on the same server as the WordPress installation. While this may be sufficient to start, there are a number of reasons you may not want your MySQL database on the same server as your WordPress installation:
● MySQL and WordPress will be competing for compute resources on the same server, potentially hurting your site’s performance.
● You are unable to horizontally scale WordPress by adding additional WordPress servers as your site becomes more popular.
● You are responsible for all database maintenance tasks, including database backups and security upgrades.
By using Amazon RDS for MySQL, these concerns go away. Your database will be on a separate instance than your WordPress installation, so they won’t be competing for resources. Further, you can create multiple WordPress installations that connect to a single MySQL instance on RDS, allowing you to scale your site horizontally. Finally, Amazon RDS for MySQL has automated backups and security patches to help you with your database administration.
In the steps below, you will launch a MySQL database using the AWS management console.