Installing a New WordPress Website on DigitalOcean
We recommend DigitalOcean as a hosting provider due to its robustness and flexibility as a hosting solution for your WordPress website.
In fact, we personally host IndigoThemes on DigitalOcean and have been able to flexibly scale our resources to meet demands, and enjoy the flexibility it provides to manage our servers.
While it provides technically advanced users many configuration options, it also makes it very easy for the beginner with tools such as their 1-click install application.
In this tutorial we'll show you how to install WordPress using the 1-click install application provided by DigitalOcean.
Who is this for?
If you've decided to use DigitalOcean to host your WordPress website, and you do not yet have a website, this guide will show you how to install a brand new copy of WordPress on your DigitalOcean server.
We'll show you step by step, from creating a DigitalOcean account, to what type of server to select. By the end of this tutorial, you'll have a website up and live on the internet, with your own domain.
You'll be ready to start adding content right away. The full process is quick and painless, so lets get started.
If you already have a website and want to switch hosting providers to use DigitalOcean, you'll need to take different steps to migrate your website.
We're going to use the 1-click install application provided by DigitalOcean as this is the fastest and easiest route.
- First off, if you don't already have a DigitalOcean account, sign up using this link for $10 in free credits.
- Click create a new Droplet.
- Under Select An Image, click on "One-click apps" and choose "Wordpress on 16.04".
- Under choose a Size, click on 1GB option at $10/month. 1GB minimum is needed for the 1-click install application. We can start here and if your needs grow, you can increase the size later on.
- Under "Choose a datacenter region" simply choose one closest to you.
- Click Create
- You'll see your droplet information, including the droplet's IP address.
- You'll also receive an email from DigitalOcean with your droplet information and a temporary password. The email will contain the following info:
- From your terminal, you'll need to SSH into your droplet. Type in:
- Enter the password that was emailed to you. It will ask you to choose a new password the first time you login. Change the password to whatever you like and save this somewhere.
- Now visit the IP address for your droplet in the browser. You'll automatically be redirected to the WordPress installation wizard.
- Follow the install instructions. This includes choosing your language and creating your admin username and password, which you will use to login to your WordPress admin dashboard.
- To change the URL, go to Settings on the left hand side, and click General. In the section for WordPress Address (URL) and Site Address (URL), enter your own domain name.
- You have now successfully installed WordPress. To start creating your website, follow the tutorials on adding a theme, adding pages and blog posts. The next section shows you how to access your MySQL database and is optional.
Accessing Your MySQL Database
- Note, your MySQL database will be created automatically. The username and password for your MySQL database are located at /root/.digitalocean_password
To view this you can SSH back into your droplet by going to your terminal and typing:
Enter the SSH password you created from Step 11 above.
- Then type:
You'll see two passwords: root_mysql_pass and wordpress_mysql_pass . Go ahead and save these passwords somewhere for future reference.
- Next, we'll install PHPMyAdmin, which is a graphical user interface for managing your MySQL database. This way you can view and manage your database from the browser instead of through the terminal.
- In the terminal, type:
apt-get install phpmyadmin
When asked do you want to continue, type "Y" for yes.
When asked which web server to use, select apache2 and click enter.
When asked if you want to automatically configure the web server, click NO.
- After PHPMyAdmin successfully installs. It'll say it's completed. We'll now configure it ourselves by typing this into the terminal:
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/sites-enabled/000-default.conf
- We'll restart Apache, by typing in:
service apache2 restart
- Now you'll be able to access PHPMyAdmin, by typing http://YOURDOMAIN/phpmyadmin or http://DROPLETIP/phpmyadmin if you didn't setup your domain name yet, into your browser.
- To login, use the MySQL login credentials from earlier. For root user login, your username is "root" and the password is the root_mysql_pass. The other username is "wordpress" and the password is the wordpress_mysql_pass.
Congratulations! You've successfully installed a brand new WordPress website onto your DigitalOcean server. It uses your own URL and is publicly accessible on the internet. You also have access to PHPMyAdmin where you can manage your database.
Next up, start customizing your website by adding a new theme, as well as start creating content by adding pages and posts.