Shared Hosting

Requirements

  • Run the npm build command npm run build

  • Archive your files in the dist directory to a .zip or .tar format archive as your hosting provider will support any of the most popular formats.

  • upload the archive to the public_html folder and extract it. Use an FTP client or GUI file manager to upload the files. That depends on the service provider, but usually, you can find File manager on the hosting cPanel. Upload the archive to the public_html folder of your domain, after that, unarchive it.

  • make sure it works. If everything worked out, enter your domain name and check if the page loads

  • If your page loads, you may not able to access other pages, if that is the case, create a file and name it .htaccess and copy and paste the code below into the file;

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>
  • All pages should be accessible now.

Last updated