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 :
- Open your command prompt (cmd) or terminal and then point it into your vue project
- Run npm run build in your command prompt (cmd) or your terminal
- 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
- Access your cPanel and open the File Manager
- 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
- Now your website is live
To decrease the load time of your web application you can use the following tips below
- Minify you resource. You should minify the javascript and css file.
- 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.
- Use lazy load images
- Make sure you already remove the unimportant code
- Make sure you already remove the unused library