1"use strict";(self.webpackChunkphpvms_docs=self.webpackChunkphpvms_docs||[]).push([[8598],{44906(e,n,o){o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>d,default:()=>c,frontMatter:()=>l,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"installation/download","title":"Download","description":"There are a few ways you can obtain phpvms and its dependencies. The full","source":"@site/docs/installation/download.md","sourceDirName":"installation","slug":"/installation/download","permalink":"/8.x/installation/download","draft":false,"unlisted":false,"editUrl":"https://github.com/phpvms/docs/tree/master/docs/installation/download.md","tags":[],"version":"current","frontMatter":{"id":"download","title":"Download"},"sidebar":"docs","previous":{"title":"Requirements","permalink":"/8.x/installation/requirements"},"next":{"title":"VHost Configs","permalink":"/8.x/installation/vhost"}}');var t=o(74848),s=o(28453);const l={id:"download",title:"Download"},d=void 0,r={},h=[{value:"How to Download",id:"how-to-download",level:2},{value:"Downloading Full Package",id:"downloading-full-package",level:3},{value:"Cloning the Repository",id:"cloning-the-repository",level:3},{value:"Uploading Files On Shared Hosting",id:"uploading-files-on-shared-hosting",level:2},{value:"Option 1: Creating a Subdomain",id:"option-1-creating-a-subdomain",level:3},{value:"Option 2: Copying the public directory",id:"option-2-copying-the-public-directory",level:3},{value:"Option 3: Symlink",id:"option-3-symlink",level:3},{value:"Option 4: Direct Upload (Not Recommended!)",id:"option-4-direct-upload-not-recommended",level:3}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["There are a few ways you can obtain phpvms and its dependencies. The full\npackage method already includes the ",(0,t.jsx)(n.code,{children:"vendor"})," directory and you don't need to do\nanything but upload it."]}),"\n",(0,t.jsx)(n.h2,{id:"how-to-download",children:"How to Download"}),"\n",(0,t.jsx)(n.h3,{id:"downloading-full-package",children:"Downloading Full Package"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"zip/tar file"})," from the downloads site contains all of the dependencies.\nSource code is not suitable for a fresh installation."]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://github.com/nabeelio/phpvms/releases",children:"Official releases and pre-releases"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"cloning-the-repository",children:"Cloning the Repository"}),"\n",(0,t.jsx)(n.p,{children:"If you chose to instead clone it from Github, rather than download it from\nabove, you can do the following:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/nabeelio/phpvms.git\ncd phpvms\nnpm install\nnpm run build\ncomposer install\n"})}),"\n",(0,t.jsxs)(n.p,{children:["After running ",(0,t.jsx)(n.code,{children:"composer install"}),", you can continue the installation instructions"]}),"\n",(0,t.jsx)(n.p,{children:"See below if you are using a shared host; otherwise, skip to the next section."}),"\n",(0,t.jsx)(n.h2,{id:"uploading-files-on-shared-hosting",children:"Uploading Files On Shared Hosting"}),"\n",(0,t.jsxs)(n.p,{children:["When uploading the files, you have several options on how to. These mainly apply\nto shared hosts. For your own server or if you have control over the vhost\nfiles, upload/extract the files to your desired location and point the vhost to\nthe ",(0,t.jsx)(n.code,{children:"/public"})," folder."]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"If you are uploading to a shared host or to cPanel, chose one of the following\nmethods when uploading your files."})}),"\n",(0,t.jsx)(n.h3,{id:"option-1-creating-a-subdomain",children:"Option 1: Creating a Subdomain"}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Creating a subdomain is the easiest and more recommended method, especially for\nshared hosting. This works well if you have a landing or promo page on your\nsite's main domain, and then a subdomain like ",(0,t.jsx)(n.code,{children:"crew.yourva.com"})," or something\nsimilar."]})}),"\n",(0,t.jsxs)(n.p,{children:["Upload phpvms to a directory with the name of your subdomain, for example,\n",(0,t.jsx)(n.code,{children:"demo.vmshost.io"}),". It should be parallel to the ",(0,t.jsx)(n.code,{children:"public_html"})," folder (as above).\nIn this example, I want to create the subdomain ",(0,t.jsx)(n.code,{children:"demo.vmshost.io"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"First, create a folder to extract phpvms into:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"/home/youruser\n demo.vmshost.io < Extract phpvms files into here\n public_ftp\n public_html\n"})}),"\n",(0,t.jsx)(n.p,{children:"Next, extract the phpvms files into this folder, so it looks something like:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"/home/youruser\n /demo.vmshost.io\n /app\n /config\n /public\n ...\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:o(34111).A+"",width:"320",height:"349"})}),"\n",(0,t.jsxs)(n.p,{children:['Next, create a subdomain cPanel, go to "Subdomains", and create the subdomain.\nFor the "Document Root", enter the path above, with the public folder -\n',(0,t.jsx)(n.code,{children:"demo.vmshost.io/public"}),". Usually, cPanel will autocomplete the path to be the\nsubdomain - so just add ",(0,t.jsx)(n.code,{children:"/public"})," to the end of it."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:o(1513).A+"",width:"640",height:"331"})}),"\n",(0,t.jsx)(n.p,{children:"It will look like this:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{src:o(49753).A+"",width:"640",height:"52"})}),"\n",(0,t.jsx)(n.h3,{id:"option-2-copying-the-public-directory",children:"Option 2: Copying the public directory"}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"Uploading and change the path of the public directory is the recommended method\nif you're on shared hosting"})}),"\n",(0,t.jsx)(n.p,{children:"This method works well if your main site is going to be phpvms."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Download/upload phpvms into a ",(0,t.jsx)(n.code,{children:"phpvms"})," folder in your home folder. It should\nlook something like:"]}
1),"\n",(0,t.jsxs)(n.li,{children:["Copy the files from the ",(0,t.jsx)(n.code,{children:"/public"})," folder into the ",(0,t.jsx)(n.code,{children:"public_html"})," folder."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"/home/youruser\n phpvms < Create this folder and upload phpvms into it\n public_ftp\n public_html < Upload the files from phpvms/public into\n"})}),"\n",(0,t.jsxs)(n.p,{children:["As long as you named the folder ",(0,t.jsx)(n.code,{children:"phpvms"}),", the ",(0,t.jsx)(n.code,{children:"index.php"})," will autodetect the\nlocation of the phpvms folder."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Updates/auto-updates won't update the files in the ",(0,t.jsx)(n.code,{children:"/public_html"})," folder, you'll\nneed to update them manually. The other method, the symlink method, is\nrecommended if you have command-line access and are more comfortable creating\nthose types of links."]})}),"\n",(0,t.jsx)(n.h3,{id:"option-3-symlink",children:"Option 3: Symlink"}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsx)(n.p,{children:"This is an advanced method and not recommended to use on shared hosts, only do\nthis if you know what you're doing"})}),"\n",(0,t.jsx)(n.p,{children:"This method works well if your main site is going to be phpvms, and you're not\nrunning something like Wordpress. Running phpvms in a subdirectory isn't\nrecommended (see method 2 instead)."}),"\n",(0,t.jsxs)(n.p,{children:["Download/upload phpvms into a ",(0,t.jsx)(n.code,{children:"phpvms"})," folder in your home folder. It should\nlook something like:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"/home/youruser\n phpvms\n public_ftp\n public_html\n"})}),"\n",(0,t.jsxs)(n.p,{children:["To make this work properly and be secure, we're going to change the\n",(0,t.jsx)(n.code,{children:"public_html"})," directory to point into the phpvms public directory. Then you can\nupload files as usual, but phpvms will be the primary entry point. When you\ncreate folder/files in the ",(0,t.jsx)(n.code,{children:"public_html"})," directory, they'll actually get created\ninto the ",(0,t.jsx)(n.code,{children:"phpvms/public"})," folder."]}),"\n",(0,t.jsxs)(n.p,{children:["SSH into your server, symlink the ",(0,t.jsx)(n.code,{children:"public_html"})," folder to point to\n",(0,t.jsx)(n.code,{children:"phpvms/public"})," instead:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"mv public_html public_html_backup\nln -s phpvms/public/ public_html\n"})}),"\n",(0,t.jsx)(n.h3,{id:"option-4-direct-upload-not-recommended",children:"Option 4: Direct Upload (Not Recommended!)"}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsx)(n.p,{children:"This method isn't recommended, it could expose some sensitive directories if it\nisn't setup correctly."})}),"\n",(0,t.jsxs)(n.p,{children:["This method isn't recommended because it can potentially expose your install if\nthe ",(0,t.jsx)(n.code,{children:".htaccess"})," or something isn't correctly configured. Upload the files\ndirectly into the ",(0,t.jsx)(n.code,{children:"public_html"})," folder, and make sure the ",(0,t.jsx)(n.code,{children:".htaccess"})," file is\nactive (check with your webhost). This uses the ",(0,t.jsx)(n.code,{children:"public"})," folder directly."]})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},1513(e,n,o){o.d(n,{A:()=>i});const i=o.p+"assets/images/subdomain-add-c6849f4f4fc599be67a8addeadad087c.png"},34111(e,n,o){o.d(n,{A:()=>i});const i=o.p+"assets/images/subdomain-folders-95d93052cb20e4064bf46af45d426472.png"},49753(e,n,o){o.d(n,{A:()=>i});const i=o.p+"assets/images/subdomain-view-2b65e50153b2ed93d0cdf07312a592ab.png"},28453(e,n,o){o.d(n,{R:()=>l,x:()=>d});var i=o(96540);const t={},s=i.createContext(t);function l(e){const n=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.