<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andreea Egli</title>
    <description>The latest articles on DEV Community by Andreea Egli (@aegli84).</description>
    <link>https://dev.to/aegli84</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F613547%2F889ddb01-8108-476d-8efd-706e71855069.jpg</url>
      <title>DEV Community: Andreea Egli</title>
      <link>https://dev.to/aegli84</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aegli84"/>
    <language>en</language>
    <item>
      <title>How to deploy your React website to Namecheap cPanel</title>
      <dc:creator>Andreea Egli</dc:creator>
      <pubDate>Tue, 02 Nov 2021 08:14:30 +0000</pubDate>
      <link>https://dev.to/aegli84/how-to-deploy-your-react-website-to-namecheap-web-hosting-provider-2ibn</link>
      <guid>https://dev.to/aegli84/how-to-deploy-your-react-website-to-namecheap-web-hosting-provider-2ibn</guid>
      <description>&lt;p&gt;If you're a newbie web developer you probably never deployed a website to a web hosting provider before but I'm here to tell you that it is not that difficult and I will show you how to do it step-by-step.&lt;/p&gt;



&lt;p&gt;&lt;em&gt;The term deploy means, publishing your updated code from source control to a hosting platform&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's start! I have chosen Namecheap because, well, the service they provide is...cheap and good.&lt;/p&gt;

&lt;p&gt;I assume that you have already purchased your domain name and hosting with Namecheap so, I will not cover that here.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 &lt;a&gt;Generate your build folder in VS Code&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;First of all, open your project in VS Code and navigate to package.json file and add the URL to the project homepage. Make sure that you add your own URL and not mine 😄 &lt;strong&gt;Attention!&lt;/strong&gt; This is a mandatory step and must not be skipped otherwise your deployment will not work. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6qsea49a32go559vx7g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo6qsea49a32go559vx7g.png" alt="package.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prepare your build folder&lt;/strong&gt; - in VS Code terminal run the command npm run build and wait for the build process to be completed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnz26zbulvrj6ujkynlx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnz26zbulvrj6ujkynlx.PNG" alt="npm run build"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frtxxpdsjayrcekarix1j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frtxxpdsjayrcekarix1j.PNG" alt="creating build folder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlm1ay322po2ew0ogijk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlm1ay322po2ew0ogijk.PNG" alt="build folder ready"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the folder has been created, you will find it a the top of the folder tree in your project:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17cllyies1fr058eu8dp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F17cllyies1fr058eu8dp.PNG" alt="build folder location"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right-click on it and click on the 'Reveal in File Explorer' tab which will take you to the build file location on your local machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjnjymoz4m8r6a0d1c05r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjnjymoz4m8r6a0d1c05r.PNG" alt="build on local"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right-click on the build folder (again) -&amp;gt; Send to -&amp;gt; Compressed (zipped) folder and you are good to go!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqb75341et1ey36c69kel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqb75341et1ey36c69kel.png" alt="build zip"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your build folder is ready to be uploaded to Namecheap 🎉🥳&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 &lt;a&gt;Build folder setup for deployment in Namecheap&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Now, let's log in to Namecheap. Once logged in, go to your Dashboard where you'll see all your domain names. Chose the one you want to deploy to and hover over the second icon under the Products column and click 'Go to cPanel':&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08xqzg2z4ewtkemivgwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08xqzg2z4ewtkemivgwy.png" alt="namecheap dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From here, find the 'FILES' section and click on 'File Manager'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5mgbbaesd3ssvazj727.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5mgbbaesd3ssvazj727.png" alt="cpanel file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will be prompted to the cPanel File Manager screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffint9n8eb0vjyhjnhy5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffint9n8eb0vjyhjnhy5d.png" alt="file manager"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to public_html on the left-hand side, click on it, and a new folder from the + Folder tab on the top navigation bar. Name the folder whatever you want, it is not important. This is where you'll be uploading and extracting your build folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftvhu5w5i6y15bt39tlb7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftvhu5w5i6y15bt39tlb7.jpg" alt="create folder"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mine is named portfolio because it relates to my project which is my portfolio website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk5h2yazb0na0eefvwfbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk5h2yazb0na0eefvwfbh.png" alt="file name"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok, let's finally upload the build zip folder. Follow the steps shown in the next images:&lt;/p&gt;

&lt;p&gt;Click on the folder you have created and hit the + Upload tab on the top navigation bar:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fca5dfsibvw44zchcgx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7fca5dfsibvw44zchcgx.jpg" alt="upload file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Drop or Select your build zip folder and wait for the upload process to be completed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehuh6xkrpi1n7vp16lo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fehuh6xkrpi1n7vp16lo3.png" alt="drop file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrl48qo5l8x20hlv9zjk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrl48qo5l8x20hlv9zjk.png" alt="upload done"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the process is completed, click on the bottom link to go back:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7mq56bic2eac9y60gf8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7mq56bic2eac9y60gf8.png" alt="click link redirect"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will be redirected to the folder where your build file has been uploaded to&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjuemx58dr8wlacpdw8ug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjuemx58dr8wlacpdw8ug.png" alt="build file location"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click once on the build.zip and hit the Extract tab on the navigation bar. Click Extract File(s) button. You have unzipped your build folder!!!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mnozd00inxiq91j93ki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mnozd00inxiq91j93ki.png" alt="build unzip"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bear with me, we're getting closer to the end...⏰&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhw6qgv6hf5wmzbbk3uc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhw6qgv6hf5wmzbbk3uc.png" alt="build"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, you can delete the build.zip folder and keep (of course 😅) the extracted version.&lt;/p&gt;

&lt;p&gt;Double-click on the build folder to reveal the files (and sub-folders) and Select All&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf9zblqg3pvjbv43rk4n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf9zblqg3pvjbv43rk4n.png" alt="extract build"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once selected, hit the Move tab on the navbar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9vqdwplrue6i9ylh9ta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9vqdwplrue6i9ylh9ta.png" alt="move build files"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter the file path where you want to move your files to and click Move File(s). My suggestion would be to move the files to &lt;br&gt;
/public_html/. At least this is my personal standard practice and preference&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdo4yvbx02namrjw2ie7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdo4yvbx02namrjw2ie7.png" alt="move path"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj6cf7gcrnlwwdbav3zgm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj6cf7gcrnlwwdbav3zgm.png" alt="move path"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Guess what?!?! We're done!!!!!&lt;br&gt;
🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳🥳&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/OcZp0maz6ALok/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/OcZp0maz6ALok/giphy.gif" alt="Congrats"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You did a great job and I truly hope my instructions were clear. I tried to be as detailed as possible because when I deployed my project for the first time, I had a few issues which I had to trial &amp;amp; error myself in order to make everything work properly.&lt;/p&gt;

&lt;p&gt;Go check out your deployed website and let me know how it worked. If you need help, drop me a line.&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>website</category>
      <category>deployment</category>
    </item>
  </channel>
</rss>
