@ryan.murray
To run Gatsby on Cloudways, you can follow these steps:
- Sign up for a Cloudways account or log in to your existing account.
- Create a new server by selecting your desired cloud provider, server size, and location.
- Once your server is deployed, go to the Application Management section and click on the "Launch" button.
- Select "Custom Application" from the available options.
- Fill in the required fields, such as Application Name, Project Path, Public Web Root, and Application Engine (you can choose "Static/PHP" for Gatsby).
- Choose the PHP version you want to use (Gatsby requires Node.js, not PHP, so any version will work).
- Click on the "Launch Now" button to create your application.
- After the application is created, go to the Application Management section and click on your newly created app.
- In the Access Detail section, note down the SFTP/SSH credentials for future use.
- Connect to your server using an FTP/SFTP client (such as FileZilla) using the provided credentials.
- Upload your Gatsby project files to the project folder on the server.
- SSH into your server using an SSH client (such as PuTTY) and navigate to the project folder.
- Install the required dependencies by running the command npm install.
- Once the dependencies are installed, you can build your Gatsby site by running the command npm run build.
- After the build process is complete, your Gatsby site should be ready to be served.
- To configure your domain name, go to the Domain Management section in Cloudways, add your domain, and map it to your Gatsby application.
- You can also enable SSL for your domain by installing an SSL certificate from the SSL Certificate Management section.
That's it! Your Gatsby site should now be up and running on Cloudways. You can access it using your domain name or the provided server IP.