Bobcares

WordPress in a subdomain on Cloud Servers with Nginx

by | Apr 26, 2023

Learn more setting up WordPress in a subdomain on Cloud Servers with Nginx from our experts. Our WordPress Support team is here to help you with your questions and concerns.

WordPress in a subdomain on Cloud Servers with Nginx

If you are looking for a guide to help you install WordPress in a subdomain with Nginx, you are in luck. Our experts have put together these steps to help you get started:

  1. Before we begin, we have to ensure that we have the following:
    • Nginx, PHP and MySQL are installed on the server
    • Root access to the server
    • Subdomain has been created and points to the server
  2. Then, log in to MySQL and create a new database for the subdomain as seen below:

    CREATE DATABASE supportdb;

  3. Next, we must grant privileges to the database we created in the previous step and assign them a strong password as well.

    grant all privileges on supportdb.* TO ‘bob’@’localhost’ identified by ‘strongpassword’

  4. Then, refresh the privileges and rules set to the database with the FLUSH PRIVILEGES command.
  5. Now, it is time to create a directory for the subdomain. After that we have to download the WordPress and then extract the archive files.

    # mkdir /var/www/support.bobcaressupport.com
    # cd /var/www/support.bobcaressupport.com
    # wget http://wordpress.org/latest.tar.gz

  6. Once we extract the files, we have to copy the files inside the created directory.
  7. Next, we are going to set the Nginx configuration. This involves creating a new file at /etc/nginx/sites-available.

    # cd /etc/nginx/sites-available
    # touch support.bobcaressupport.com .conf

  8. After that, we have to copy the following Nginx configuration and save it in the file and ensure the Nginx syntax is correct.

    WordPress in a subdomain on Cloud Servers with Nginx

  9. Now, it is time to create a symlink. We can do this by activating the Nginx server block by linking it to the /etc/nginx/sites-enabled as seen below:

    ln –s /etc/nginx/sites-available/support.bobcaressupport.com.conf /etc/nginx/sites-enabled/support.bobcaressupport.com.conf

  10. Finally, restart the Nginx and PHP processes:

    # systemctl restart nginx.service
    # systemctl restart php7.4-fpm.service

  11. Now, we can finally, log in to the subdomain, and and click “Run the installation”.
  12. Next, choose the required language and click Continue.
  13. Then, we have to click Let’s go and enter the following details:
    • Database name
    • Username
    • Password
    • Database Host
    • Table Prefix

    Then, click Submit.

  14. In the next window, enter the following details:
    • Site Title
    • Username
    • password
    • Your email
    • Search Engine Visibility

    Then, click Install WordPress.

After the final step, we will be able to view the WordPress dashboard.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

To sum up, our Support Techs introduced us to setting up WordPress in a subdomain on Cloud Servers with Nginx.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.