Jekyll is a ruby-written static website generator. It has well-described documentation, friendly community and a bunch of open source plugins for any use case. One of the reasons we choose Jekyll among other static website generators is simplicity and scalability of its development and deployment process.
If you’re new to static generated websites and has worked only with CSM-powered websites before, it may be tough to get on CI-deployment. If so, you can continue using your cPanel hosting to host your website.
Those simple steps will help you to move your Jekyll website live:
- First of all, make sure you’re not running your Jekyll local server and remove the _site folder from your project root directory;
JEKYLL_ENV=production jekyll buildin the terminal and wait for your website to get generated;
- Navigate to the just created _site folder after generation is finished and archive its content;
- Go to your cPanel hosting and open website directory using cPanel File manager;
- Upload Jekyll archive file to the root of your website, remove all the existing files and after unarchiving static website delete ZIP-file as well;
- Check your website live!
You may notice the server returning 404, 403 or 500 status codes after deploying the static website. Probably, the reason for the issue is that .htaccess file of the previous website wasn’t removed from the hosting. Enable Show Hidden Files (dotfiles) option in cPanel File Manager Settings and remove the outdated .htaccess file.