Setup a WordPress server in 3 steps
Technologies
WordPress is a go to standard for do it yourself website creation; however, setting up the server itself can be a bit daunting. In the following sections we are going to build our WordPress server using the drag and drop functionality of the IONOS DCD environment and use a cloud-init configuration that we will copy and paste into our server instance that automatically installs WordPress using open source IONOS cloud-init functionality and a bash script.
Step 1: Build server and paste cloud-init data
Time: ~4 minutes
Complete each item listed below and follow the video on the right.
- Login to the IONOS DCD at https://dcd.ionos.com
- Create our Virtual Data Center
- Create our server instance by dragging the server icon to the design grid
- Connect the server to the internet by clicking the plus sign on the server and dragging to the internet icon
- Click on the HDD storage and drag onto the server
- From right select image drop down and select “Ubuntu-20.04-server-cloudimg-amd-yyyymmdd” Please note that the trailing date yyyymmdd of the image will change based upon updates.
- Set the desired root password in the password field
- From ionoslabs.com click on “copy to clipboard”
- Within the DCD click “Cloud-Init user data” click in the “User Data” field and paste the cloud-config
- Click “OK” and then click “Provision Changes” this will start the server build
Using the open source technology of cloud-init we have created this config that will run at first boot. The configuration tells our Ubuntu server to install Apache2 (a web server application) and then download a bash script from a public Git repository. Next it changes that downloaded script to executable, and then runs the script all as the root user. Get more information about cloud-init
Step 2: Watch server provisioning and wait for completion
In this step we will use the IONOS DCD console function to watch the server finish its install
Time: Approx 4 minutes
- After the DCD has finished the provisioning sequence you can right click on the server instance and select “Console”
- Within this screen you can watch the cloud-init and wordpress install scripts perform their install
- You will know when the installation is complete once you see a line that says OK “Finished Execute Cloud user/final scripts”
- NOTE: Write down the Database Name, Database User, Database Password and Mysql root password that were generated during installation, these should be listed slightly higher up in the console screen. You can also get these password later by going to /var/log/cloud-init-output.log file
As part of the cloud-init config we told the server to go and get a bash script from github at https://github.com/ionoslabs/wp-install/wp-install.sh
This script performs the WordPress install on the server, including installing MySQL, PHP, and a number of other required applications and packages.
Step 3: Finish WordPress setup in browser
In this step we will finish the WordPress setup in our browser
Time: Approx 3 minutes
- You can now finish the WordPress setup via the browser by going to the IP address of the instance that was just created.
- Get the IP address by clicking on the instance and going to the Network section on the right NAV. Copy the IP address listed in “Primary IPv4” and paste this into a web browser
- Provide a Site Title, username and password for the WordPress site, this username and password will be created as the admin account in WordPress NOTE: Make sure to copy the password you set here so that you can login later, by default the password is randomly generated
- The WordPress install is now complete!
Using our web browser here is the last step in finishing our WordPress install.