Tutorials
Trending

How To Use the WordPress One-Click Install on DigitalOcean

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL. It is one of the most popular web-publishing platforms used to create and manage websites. WordPress allows users to create, manage and publish content, such as text, images, and videos, on a website without the need for coding or technical skills.

WordPress also has a large community of developers who have created and contributed to an extensive library of plugins and themes which allows users to add various functionalities and designs to their website. This makes WordPress very flexible and adaptable to different types of websites, such as blogs, e-commerce sites, portfolios, and more.

WordPress is also known for its ease of use, which makes it accessible to a wide range of users, from beginners to experts. With its simple interface, users can easily add and edit content, manage media, and customize the design of their website.

1-Click Deployment

This tutorial will guide you through setting up a WordPress site using the WordPress 1-Click App.

In addition to the features installed in a regular Ubuntu 20.04 Droplet, the WordPress 1-Click image also includes the following components:

  • Apache: A widely used web (HTTP) server.
  • MySQL: A commonly used open-source relational database.
  • PHP: PHP language support.

Typically, these components are installed together to enable a server to host dynamic websites, such as WordPress, through the LAMP stack. LAMP refers to a configuration of a Linux operating system with an Apache web server, with site data stored in a MySQL database and dynamic content generated by PHP.

To improve security, the following additional components are included:

  • UFW: A program to manage a firewall.
  • Fail2ban: A service that automatically updates your firewall configuration to block attackers.

Using a WordPress 1-Click Droplet, you will set up your WordPress site, configure the domain, and learn how to access the MySQL database.

Step 1 — Creating A WordPress Droplet

Create a WordPress Droplet from the 1-Click App Marketplace by pressing the Create WordPress Droplet button:

On the Create Droplets page, you can customize your settings before creating your WordPress Droplet. All the choices you need to make are described in detail in the guide on How to Create your First Droplet. The following sections are a few key settings to consider.

Choosing an image:

Your image will already be set to the Marketplace tab with WordPress 5.8 on Ubuntu 20.04:

If this is not selected, use the search box to search for WordPress.

When the WordPress image has been properly selected, you can accept the default settings or adjust them according to your needs. Typically, we recommend the following changes:

When the WordPress image has been properly selected, you can accept the default settings or adjust them according to your needs. Typically, we recommend the following changes:

Choosing a datacenter region:

To avoid potential latency, it is recommended that you select a datacenter region closest to your user base. In some regions we have more than one datacenter. There is no difference between these same region datacenters (e.g., SFO3 and SFO2).

Choosing a plan:

To run a Droplet with WordPress it is recommended to have at least 1GB of RAM or more.

Choosing an authentication method:

The SSH Key option is recommended, rather than a Password for your Droplet. Authentication using SSH Keys is typically more secure.

Selecting additional options:

Adding improved metrics monitoring and alerting to your Droplet helps you follow your Droplet resource usage over time. You may also want to consider enabling automated backups. You can come back later to enable backup functionality on Droplets you’ve already created.

Choosing a hostname:

Give your Droplet an identifying name that you will remember, such as “WordPress Droplet 1” or the name of the site you plan to host.

When you’ve made your choices, press Create Droplet in the bottom bar of the control panel screen. Once the Droplet is created, its IP address will be displayed. You can connect to and configure your Droplet by accessing this IP address. Hover over the IP address and press Copy to copy it to your clipboard:

Droplets created through the 1-Click Marketplace comes with additional resources that you can access by pressing Get started:

This toggles a new panel, where you can gain additional information specific to your 1-Click application. This includes an overview, further steps to get started using your Droplet, and links to relevant tutorials from our Community site. Furthermore, you’ll have access to support and other resources for WordPress:

Next, you’ll use this IP address to view the WordPress site.

Step 2 — Checking the Placeholder Page

To visit your new site, navigate to the Droplet’s IP address in your web browser. You will see the following page until you login with SSH:

The purpose of this security measure is to protect the initial configuration of WordPress, in which the administrative user is created.

It is safe to leave the installation in this state until you are ready to configure WordPress.

Step 3 — Accessing the Droplet via SSH to Enable Configuration

SSH is required to remove the placeholder web page from the Droplet. Once you’ve connected, it’s important to complete WordPress configuration as soon as possible. Anyone finding your site could create the administrative user and password until you do.

From the command line, connect directly to the server. In order to configure WordPress, you must complete this task once. Check out How To Connect To Your Droplet With SSH if you haven’t used a terminal program like SSH or PuTTY before.

Once you’re ready, open a terminal on your computer and log into your Droplet via SSH as root (or your administrative user). Make sure you use the IP address of your Droplet:

ssh root@your_server_ip

Once you’re signed in, you will be asked a series of prompts to get your WordPress site set up and enable configuration.

The first step is to provide a domain or subdomain name. By providing an e-mail address, a username, a password, and a blog title, you will create a new admin account for WordPress. After entering this information, you will be asked to confirm it is accurate. Write y and press Enter if it does. For your reference, here are all the prompts:

Enter the domain name for your new WordPress site.
(ex. example.org or test.example.org) do not include www or http/s
--------------------------------------------------
Domain/Subdomain name: example.com
Enabling conf block-xmlrpc.
To activate the new configuration, you need to run:
  systemctl reload apache2
Now we will create your new admin user account for WordPress.
Your Email Address: [email protected]

Username: sammy

Password: wp_password

Blog Title: Sammy Swims

Is the information correct? [Y/n] y

Once you’ve answered these questions, Let’s Encrypt will ask if you want a certificate. In order to enable encrypted HTTPS on web servers, Let’s Encrypt facilitates the process of obtaining and installing free TLS/SSL certificates. To generate a certificate for you, please enter yes or y to this question.

Once you have completed this initial configuration, you can log in as the administrative user you created and continue to set up your site.

Step 4 — Logging Into the WordPress Admin Panel

You can log in to your WordPress admin panel by navigating to https://example.com/wp-admin using the admin account credentials you created earlier. Enter your login credentials with your username, email, and password. Once you’ve entered that information, press on Log In:

WordPress admin login page

After logging in, you can customize the appearance of your site, install plugins, or create new posts and pages. It is important to note any red notifications, especially if they pertain to updates. Keeping your WordPress up-to-date is recommended for good security:

Step 6 — Locating Logins and Passwords

You can access additional details about installation in the Message of the Day (MOTD), which is displayed when you log into your Droplet via SSH:

-------------------------------------------------------------------------------
Welcome to DigitalOcean's One-Click WordPress Droplet.
To keep this Droplet secure, the UFW firewall is enabled.
All ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS).
-------------------------------------------------------------------------------------

If you need to access your MySQL database server, you can find your MySQL root user password in the /root/.digitalocean_password file with the following command:

cat /root/.digitalocean_password

Copy

Outputroot_mysql_pass="c404aed5e912278adb4EXAMPLE9782f390286d706a9c4f72"
wordpress_mysql_pass="619863e454cEXAMPLE15be13d9730db5c0a52ad6a4d2491a"

On the line that begins root_mysql_pass, copy the password inside the quotation marks. Using the mysql command, specify a user (root) and the -p flag to prompt for a password as follows:

mysql -u root -p

When prompted, insert the password you copied.

Conclusion

Following our Initial Server Setup guide, you can enhance your WordPress site’s security by giving sudo privileges to your user, locking down root login, and taking other steps to make your Droplet production-ready.

Dmitry Pierce

I am passionate about understanding consumer behavior, identifying market trends, and creatively communicating the unique value of products or services to potential customers. I am driven by a desire to positively impact people's lives by helping businesses succeed.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button