Thumbnail article
How to deploy vue in cpanel shared hosting

Vue is a very popular JavaScript Framework and it is experiencing enormous growth. Simple and small, but very powerful. It might be a little different from all other JavaScript Frameworks. Vue is very flexible, but the fact that the core of Vue has two packages that are critical to any web application (such as routing and state management) makes it much more fragmented than React.

Vue can be deploy in shared hosting or dedicated server. The most popular website control panel is cPanel. cPanel is a control panel that is used to make settings on web hosting services which include file management, database, domain, security, software and other configurations. Without cPanel, web hosting settings can only be done via text commands. cPanel makes it easy for users to perform various configurations through an attractive and easy-to-operate user interface. You can deploy the vue in cpanel hosting by using this step :

  1. Open your command prompt (cmd) or terminal and then point it into your vue project
  2. Run npm run build in your command prompt (cmd) or your terminal
  3. You will see there is a new directory called dist, open the dist folder and select all of the file inside the directory and archive it into a zip format
  4. Access your cPanel and open the File Manager
  5. Upload the zip file in public_html folder in your server and extract the zip. You can delete the zip after you have extracted it
  6. Now your website is live

To decrease the load time of your web application you can use the following tips below

  1. Minify you resource. You should minify the javascript and css file.
  2. Compress your image if you are using jpeg or png file. You can use lossless or lossy compression. But its better if you are convert into webp format because the size of your image will become smaller.
  3. Use lazy load images
  4. Make sure you already remove the unimportant code
  5. Make sure you already remove the unused library

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *