DEV Community

Fum
Fum

Posted on

How do you deploy your Gatsby website?

I'm planning to build a Gatsby based website. I'm new to web dev and its related jargon so I'm still doing research on how this will all come together.

I have a WordPress site I host with Hostinger and need to upgrade my plan to a VPS to be able to host a React-based site. But before I make a decision I wanted to know how others deploy Gatsby sites.

Has anyone used providers that are typically known for hosting CMS based sites for deploying their Gatsby site? Like Hostinger, Namecheap, Bluehost, HostGater, etc..

Or how do you deploy your Gatsby site?

Thanks.

Top comments (16)

Collapse
 
dejesumensaje profile image
Dejesumensaje

I built a site using Gatsby, but when I use the Gatsby Build command my site doesn't work locally. The images and links are broken. I know that you can deploy to Netlify, but my work requires me to send the static files. Maybe I'm omitting something?

Collapse
 
funbeedev profile image
Fum • Edited

Hi there!
Do your images load if you run gatsby develop and view the site through localhost:8000?
Which directory have you placed your images? Try placing them under the static/ folder if not there already. And import images into your files using the import statement. e.g. import my_image from "../static/my_image.png

Collapse
 
prosper74 profile image
Prosper Atu • Edited

You might be having rehydration error: This occur due to a "mismatch" between the code sent by the server and the code rendered in the browser. I wrote about this in my blog prosper-blog.netlify.app/blog/rehy...

Hope it helps

Collapse
 
andrewbaisden profile image
Andrew Baisden

No need for shared hosting paid plans you can deploy React/Gatsy websites for free. Here are some free top serverless hosts.

Netlify
Vercel
Heroku
Github Pages
Surge
AWS S3

Collapse
 
zendannyy profile image
zendannyy

I have a dumb question. You say these are free methods to deploy Gatsby websites, yet nothing in AWS is free to my knowledge. How does this work?

Collapse
 
andrewbaisden profile image
Andrew Baisden

AWS has a free tier see here docs.aws.amazon.com/awsaccountbill...

Collapse
 
yogiokto profile image
yogiokto

Website built with Gatsby is static site, it's very easy to deploy.
You can check this link gatsbyjs.com/docs/deploying-and-ho..., and choose one of them.
I use netlify, easy dan free..

Collapse
 
buraksaraloglu profile image
Burak Saraloglu

You should search for "Continuous delivery" or "CI/CD". It will cover all your current and future questions.

Collapse
 
ksomao profile image
ksomao • Edited

start-creation.be/
Hosted on hostinger with the simple web hosting plan. You just need to upload it to your public folder.

Collapse
 
funbeedev profile image
Fum

Was it a shared hosting plan or VPS?

Collapse
 
ksomao profile image
ksomao • Edited

A Shared hosting plan. But at the end of the day, when your gatsby website is builded, it's just a simple static website, so you can host it wherever you want.

Collapse
 
rahkee profile image
Ray Villaraza

I see all the great suggestions for static hosting, but do they support WordPress? Apologize if I'm off on my understanding. Thank you!

Collapse
 
funbeedev profile image
Fum

Interesting question! I had a quick look and found this: netlify.com/with/wordpress/
Not something I've tried myself but hope that helps.

Collapse
 
rahkee profile image
Ray Villaraza

I'll check it out, thanks!

Collapse
 
jvarness profile image
Jake Varness

I have my Gatsby site deployed to Vercel. Here’s why:

jvarness.blog/how-this-site-was-made/

Collapse
 
sabderemane profile image
Sarah Abd

I'm deploying mine with netlify, super easy. If you have any questions, don't hesitate !