Skip to main content
St Louis

Back to all posts

How to Install Gatsby on Cloudways?

Published on
5 min read
How to Install Gatsby on Cloudways? image

Best Hosting Solutions for Gatsby to Buy in October 2025

1 Embracing the Power of Cloud Hosting for Banking Solutions: A Handful Guide for Professionals

Embracing the Power of Cloud Hosting for Banking Solutions: A Handful Guide for Professionals

BUY & SAVE
$14.58 $17.99
Save 19%
Embracing the Power of Cloud Hosting for Banking Solutions: A Handful Guide for Professionals
2 Steadfast Self-Hosting: Rapid-Rise Personal Cloud

Steadfast Self-Hosting: Rapid-Rise Personal Cloud

BUY & SAVE
$25.00
Steadfast Self-Hosting: Rapid-Rise Personal Cloud
3 Cloud Native DevOps with Kubernetes: Building, Deploying, and Scaling Modern Applications in the Cloud

Cloud Native DevOps with Kubernetes: Building, Deploying, and Scaling Modern Applications in the Cloud

BUY & SAVE
$49.49 $89.99
Save 45%
Cloud Native DevOps with Kubernetes: Building, Deploying, and Scaling Modern Applications in the Cloud
4 Microsoft Azure Administrator Exam Ref AZ-104

Microsoft Azure Administrator Exam Ref AZ-104

BUY & SAVE
$26.13 $44.99
Save 42%
Microsoft Azure Administrator Exam Ref AZ-104
5 Kubernetes Security and Observability: A Holistic Approach to Securing Containers and Cloud Native Applications

Kubernetes Security and Observability: A Holistic Approach to Securing Containers and Cloud Native Applications

BUY & SAVE
$35.83 $55.99
Save 36%
Kubernetes Security and Observability: A Holistic Approach to Securing Containers and Cloud Native Applications
6 Cosmic Clouds Clear Hookah Set with Everything - Acrylic Glass Hookah with LED Light and Remote Control | Electric Hookah Heat Management Device, Includes Steel Coal Tongs, Shisha Fork, 2 Silicone Hoses, Brush, Custom Carry Case & 2 Extra Silicone Tips

Cosmic Clouds Clear Hookah Set with Everything - Acrylic Glass Hookah with LED Light and Remote Control | Electric Hookah Heat Management Device, Includes Steel Coal Tongs, Shisha Fork, 2 Silicone Hoses, Brush, Custom Carry Case & 2 Extra Silicone Tips

  • PREMIUM EXPERIENCE: ENJOY FLAVORFUL SESSIONS WITH OUR ADVANCED HEAT SYSTEM!
  • VIBRANT ATMOSPHERE: CUSTOMIZE YOUR VIBE WITH REMOTE-CONTROLLED LED LIGHTING!
  • TRAVEL FRIENDLY: DURABLE, PORTABLE DESIGN WITH A CUSTOM CARRY CASE INCLUDED!
BUY & SAVE
$34.99 $44.99
Save 22%
Cosmic Clouds Clear Hookah Set with Everything - Acrylic Glass Hookah with LED Light and Remote Control | Electric Hookah Heat Management Device, Includes Steel Coal Tongs, Shisha Fork, 2 Silicone Hoses, Brush, Custom Carry Case & 2 Extra Silicone Tips
+
ONE MORE?

To install Gatsby on Cloudways, you can follow these steps:

  1. Log in to your Cloudways account and select the server where you want to install Gatsby.
  2. Access your server's control panel by clicking on the "Applications" tab.
  3. Click on the "+" button to create a new application.
  4. In the application creation wizard, select the desired options for your Gatsby application, such as the server, application name, and project path.
  5. Choose the desired PHP version for your application. Gatsby is a static site generator and doesn't require PHP, so any version will work.
  6. Select the appropriate web application (e.g., Apache or Nginx) for your server.
  7. Choose the desired database application or skip this step if your Gatsby site doesn't require a database.
  8. Click on the "Create Application" button to create your Gatsby application.
  9. Once the application is created, navigate to the "Access Details" section and note the public IP address of your server.
  10. Access your server via SSH using your preferred SSH client (e.g., PuTTY for Windows or Terminal for MacOS).
  11. Navigate to the project path of your Gatsby application on the server using the command line.
  12. Install Node.js and NPM if they are not already installed on your server.
  13. Clone or upload your Gatsby project files to the server.
  14. Install Gatsby globally by running the command npm install -g gatsby-cli.
  15. Install the required dependencies for your Gatsby project by running the command npm install.
  16. Build your Gatsby project by running the command gatsby build.
  17. Configure your web server to serve the Gatsby site by pointing the server's document root to the Gatsby public directory.
  18. Restart the web server to apply the changes.
  19. Access your Gatsby site by entering the public IP address of your server in a web browser.

These steps will guide you through the installation process of Gatsby on Cloudways.

How to access database management tools for a Gatsby project on Cloudways?

To access database management tools for a Gatsby project on Cloudways, you need to follow these steps:

  1. Login to your Cloudways account.
  2. Select the desired Gatsby project from your list of applications.
  3. On the project's dashboard, locate and click on the "Database Manager" option in the left-side menu.
  4. In the Database Manager section, you will see various options for managing your database. Cloudways supports popular database management tools like phpMyAdmin, Sequel Pro, Navicat, and SQLyog.
  5. To access the tool, click on the desired option.
  6. A new window or tab will open with the database management tool of your choice.
  7. Enter the necessary login credentials for your database (username, password, database name, etc.) that you set up during the Gatsby project deployment process.
  8. Once logged in, you will have access to all the database management functionalities provided by the selected tool.

Remember to be cautious while making changes to your database, as incorrect modifications can lead to data loss or other issues. It is recommended to take regular backups before performing any critical actions.

How to optimize images in a Gatsby project on Cloudways?

To optimize images in a Gatsby project on Cloudways, you can follow these steps:

  1. Install the gatsby-plugin-sharp and gatsby-transformer-sharp packages by running the following command in your project's root directory:

npm install gatsby-plugin-sharp gatsby-transformer-sharp

  1. Update your gatsby-config.js file to include the plugins. Open the file and add the following lines of code:

module.exports = { plugins: [ `gatsby-plugin-sharp`, `gatsby-transformer-sharp`, ] }

  1. Use the Gatsby ImageSharp to automatically optimize images. In your project, wherever you are using an image, you can use the ImageSharp component instead. For example:

import { graphql, useStaticQuery } from 'gatsby' import Img from "gatsby-image"

const MyComponent = () => { const data = useStaticQuery(graphql` query { placeholderImage: file(relativePath: { eq: "your-image-name.jpg" }) { childImageSharp { fluid(maxWidth: 500) { ...GatsbyImageSharpFluid } } } } `)

return }

export default MyComponent

  1. Run the build command for your Gatsby project to generate optimized images:

gatsby build

  1. Finally, deploy your Gatsby project on Cloudways. Once deployed, Cloudways will automatically serve the optimized images.

Note: Make sure the images you want to optimize are stored locally in your Gatsby project. If you are fetching images dynamically from a remote source, you may need to use other techniques like lazy loading or implementing a CDN for further optimizations.

How to sign up for Cloudways?

To sign up for Cloudways, follow these steps:

  1. Go to the Cloudways website (https://www.cloudways.com) in your web browser.
  2. Click on the "Get Started Free" or "Sign Up" button on the homepage.
  3. On the registration page, you have two options to sign up: "Start a Free Trial" or "Sign Up with Google". Choose the suitable option for you. If you choose "Start a Free Trial", you need to provide your email address, first name, last name, and create a password. Then click on the "Start Free Trial" button. If you choose "Sign Up with Google", click on the Google icon and follow the prompts to sign in to your Google account.
  4. If you chose the "Start a Free Trial" option, you will be redirected to the Cloudways login page. Here, enter your email address and password you created during the sign-up process and click on the "Sign In" button.
  5. Next, you will be taken to the Cloudways' dashboard, where you can start setting up your server and deploying applications.

Note that Cloudways offers a free trial, allowing you to explore their platform and services before making a decision to subscribe.