{"id":261,"date":"2018-12-10T10:11:28","date_gmt":"2018-12-10T04:41:28","guid":{"rendered":"https:\/\/mediastroke.com\/blog\/?p=261"},"modified":"2018-12-27T09:57:30","modified_gmt":"2018-12-27T04:27:30","slug":"deployment-of-yii2-framework-project-on-cpanel","status":"publish","type":"post","link":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/","title":{"rendered":"Host yii2 framework project using cPanel"},"content":{"rendered":"

Host yii2 framework project using cPanel<\/h1>\n

Yii2 Hosting refers to web hosting that configured to support hosting of Yii2 framework software. The\u00a0Yii2 framework is a PHP framework that used to develop web applications.\u00a0Yii2 hosting using cPanel is easy just to\u00a0follow steps mentioned below:<\/p>\n

1. Upload yii2 framework project on cPanel :<\/h4>\n

First, you have\u00a0to create a zip file of\u00a0the yii2 project and then upload and extract it on cPanel. To upload zip file on cPanel, login into to the cPanle and go to the File manager. In the File Manager, click on public_html\u00a0and then click on Upload to upload a zip\u00a0file. public_html(runs project using hostname\u00a0on a browser) is a default\u00a0directory to run the project\u00a0using cPanel. After completion of upload\u00a0of a zip file and extract it as shown in below snapshot:<\/p>\n

\"yii<\/a><\/p>\n

2. Move files located in web\u00a0directory:<\/h4>\n

The web root directory of a yii2 project named as a web. Web root directories such as www, htdocs, and public_html of web server. We have to move all files located into the web directory to the public_html as shown in below snapshot:<\/p>\n

\"yii2<\/a><\/p>\n

4. Add .htaccess\u00a0file:<\/h4>\n

If a web server is\u00a0apache server then add an extra .htaccess file\u00a0into the web directory or public_html where the index.php file is located. The .htaccess file includes the following content as shown in below snapshot:<\/p>\n

\"yii2<\/a><\/p>\n

5. index.php file :<\/strong><\/h4>\n

Edit index.php file which was located into the web directory and we have moved it into\u00a0public_html. If it does not move then move it into public_html as shown in below snapshot:<\/p>\n

\"yii2<\/a><\/p>\n

\u00a06. Database connectivity:<\/h4>\n

Create a database\u00a0and import your database file in that database<\/p>\n

To understand the process of creation of the database, refer to our previous blog which includes details information about database creation.<\/span><\/p>\n

https:\/\/mediastroke.com\/blog\/deploy-dynamic-java-project-on-java-hosting\/<\/a><\/p>\n

project_folder\/config\/db.php<\/strong><\/h5>\n

When you have done creation and import of database, edit db.php file located\u00a0in config folder inside your project which contains database\u00a0connectivity. When you open db.php to be edit write database name, username, and password as shown in below snapshot:<\/p>\n

\"yii<\/a><\/p>\n

7. Run yii2 framework project:
\n<\/a><\/h4>\n

After that in the end, enter your hostname in the address bar of\u00a0the browser and run the project online. Below snapshot shows the\u00a0execution of a basic template of yii2 framework project as shown in below snapshot:<\/p>\n

\u00a0<\/a>\"yii2<\/a><\/p>\n

Steps summary:<\/strong><\/h4>\n
    \n
  1. Upload yii2 framework project on cPanel<\/li>\n
  2. Move all files located into the web directory to public_html<\/li>\n
  3. Add .htaccess file<\/li>\n
  4. Edit index.php file<\/li>\n
  5. database connectivity<\/li>\n
  6. Run yii2 framework project or yii2 hosting.<\/li>\n<\/ol>\n

     <\/p>\n","protected":false},"excerpt":{"rendered":"

    Host yii2 framework project using cPanel Yii2 Hosting refers to web hosting that configured to support hosting of Yii2 framework […]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[28,25],"yoast_head":"\nHost yii2 framework project using cPanel -<\/title>\n<meta name=\"description\" content=\"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deployment of yii2 framework project using cPanel\" \/>\n<meta property=\"og:description\" content=\"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mediastroke\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-10T04:41:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-27T04:27:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/Untitled-design-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shreya Chavan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Deployment of yii2 framework project using cPanel\" \/>\n<meta name=\"twitter:description\" content=\"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/Untitled-design-2.png\" \/>\n<meta name=\"twitter:creator\" content=\"@mediastrokehost\" \/>\n<meta name=\"twitter:site\" content=\"@mediastrokehost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shreya Chavan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\"},\"author\":{\"name\":\"Shreya Chavan\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/93995bcfd8a42210af4441b7eb0fa49c\"},\"headline\":\"Host yii2 framework project using cPanel\",\"datePublished\":\"2018-12-10T04:41:28+00:00\",\"dateModified\":\"2018-12-27T04:27:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\"},\"wordCount\":444,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6-300x189.png\",\"keywords\":[\"yii2 framework\",\"yii2 hosting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\",\"url\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\",\"name\":\"Host yii2 framework project using cPanel -\",\"isPartOf\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6-300x189.png\",\"datePublished\":\"2018-12-10T04:41:28+00:00\",\"dateModified\":\"2018-12-27T04:27:30+00:00\",\"description\":\"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.\",\"breadcrumb\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage\",\"url\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6.png\",\"contentUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6.png\",\"width\":1385,\"height\":873},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mediastroke.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Host yii2 framework project using cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#website\",\"url\":\"https:\/\/mediastroke.com\/blog\/\",\"name\":\"\",\"description\":\"Web Hosting Provider\",\"publisher\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mediastroke.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#organization\",\"name\":\"MediaStroke\",\"url\":\"https:\/\/mediastroke.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png\",\"contentUrl\":\"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png\",\"width\":320,\"height\":50,\"caption\":\"MediaStroke\"},\"image\":{\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/mediastroke\",\"https:\/\/x.com\/mediastrokehost\",\"https:\/\/www.linkedin.com\/company\/mediastroke-servers\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/93995bcfd8a42210af4441b7eb0fa49c\",\"name\":\"Shreya Chavan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f1a9097ecbe60843255f6d197c0a57bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f1a9097ecbe60843255f6d197c0a57bf?s=96&d=mm&r=g\",\"caption\":\"Shreya Chavan\"},\"sameAs\":[\"https:\/\/mediastroke.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Host yii2 framework project using cPanel -","description":"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"Deployment of yii2 framework project using cPanel","og_description":"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.","og_url":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/","article_publisher":"https:\/\/www.facebook.com\/mediastroke","article_published_time":"2018-12-10T04:41:28+00:00","article_modified_time":"2018-12-27T04:27:30+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/Untitled-design-1.png","type":"image\/png"}],"author":"Shreya Chavan","twitter_card":"summary_large_image","twitter_title":"Deployment of yii2 framework project using cPanel","twitter_description":"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.","twitter_image":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/Untitled-design-2.png","twitter_creator":"@mediastrokehost","twitter_site":"@mediastrokehost","twitter_misc":{"Written by":"Shreya Chavan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#article","isPartOf":{"@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/"},"author":{"name":"Shreya Chavan","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/93995bcfd8a42210af4441b7eb0fa49c"},"headline":"Host yii2 framework project using cPanel","datePublished":"2018-12-10T04:41:28+00:00","dateModified":"2018-12-27T04:27:30+00:00","mainEntityOfPage":{"@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/"},"wordCount":444,"commentCount":0,"publisher":{"@id":"https:\/\/mediastroke.com\/blog\/#organization"},"image":{"@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6-300x189.png","keywords":["yii2 framework","yii2 hosting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/","url":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/","name":"Host yii2 framework project using cPanel -","isPartOf":{"@id":"https:\/\/mediastroke.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6-300x189.png","datePublished":"2018-12-10T04:41:28+00:00","dateModified":"2018-12-27T04:27:30+00:00","description":"These are the steps how to deploy yii2 framework project using cPanel. Using this blog you can host your yii2 project using cPanel.","breadcrumb":{"@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#primaryimage","url":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6.png","contentUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2018\/12\/6.png","width":1385,"height":873},{"@type":"BreadcrumbList","@id":"https:\/\/mediastroke.com\/blog\/deployment-of-yii2-framework-project-on-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mediastroke.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Host yii2 framework project using cPanel"}]},{"@type":"WebSite","@id":"https:\/\/mediastroke.com\/blog\/#website","url":"https:\/\/mediastroke.com\/blog\/","name":"","description":"Web Hosting Provider","publisher":{"@id":"https:\/\/mediastroke.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mediastroke.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mediastroke.com\/blog\/#organization","name":"MediaStroke","url":"https:\/\/mediastroke.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png","contentUrl":"https:\/\/mediastroke.com\/blog\/wp-content\/uploads\/2024\/03\/mediastroke-white-logo-blog-50h.png","width":320,"height":50,"caption":"MediaStroke"},"image":{"@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/mediastroke","https:\/\/x.com\/mediastrokehost","https:\/\/www.linkedin.com\/company\/mediastroke-servers"]},{"@type":"Person","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/93995bcfd8a42210af4441b7eb0fa49c","name":"Shreya Chavan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mediastroke.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f1a9097ecbe60843255f6d197c0a57bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f1a9097ecbe60843255f6d197c0a57bf?s=96&d=mm&r=g","caption":"Shreya Chavan"},"sameAs":["https:\/\/mediastroke.com"]}]}},"_links":{"self":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts\/261"}],"collection":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":38,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"predecessor-version":[{"id":412,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/posts\/261\/revisions\/412"}],"wp:attachment":[{"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mediastroke.com\/blog\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}