How can I put my cakephp 3.0 project on a shared hosting server?

I made a project in cakephp 3.0 that I want to host on a shared hosting server.

Cakephp documentation provided a solution for previous versions here http://book.cakephp.org/2.0/en/installation/advanced-installation.html , where the directory structure is different from the new one.

In the old version for pre-installation on a shared hosting server, the entire project is divided into 3 parts

  • Pb
  • and
  • Webroot

and then this path is written to the .htaccess file to start the project.

In the new version, the application directory became src, webroot as it is, but I could not find the lib directory for installation.

Can someone help me how to do this in the latest version?

+4
3

, , , :

/home/username/public_html/
    // webroot contents goes here
    css/
    img/
    js/
    .htaccess
    index.php

/home/username/mycakeapp/
    // necessary app directories go here
    /config
    /logs
    /plugins
    /src
    /tmp
    /vendor

WWW_ROOT mycakeapp/config/paths.php 52:

define('WWW_ROOT', '/home/username/public_html/' . DS);

, bootstrap.php, webroot index.php 28 ( /home/username/public_html/index.php):

require '/home/username/mycakeapp/config/bootstrap.php';
+3

@jjz.

:

/home/username/public_html (with webroot contents)
/home/username/mycakeapp (installed cakephp 3 app)

/home/username/public_html/index.php:

FROM: require dirname(__DIR__) . '/config/bootstrap.php';
TO: require dirname(__DIR__) . '/mycakeapp/config/bootstrap.php';

/home/username/mycakeapp/config/paths.php:

FROM: define('WWW_ROOT', ROOT . DS . 'webroot' . DS);
TO: define('WWW_ROOT', realpath(ROOT . DS . '../public_html' . DS));

, , , /home/username.

+2

CakePHP3, .

:

  •  
  • cPanel/File Manager  
  • -/home/username  
  • (-) :/home/username/public_html

:

  •  
  • Copy the contents of the application root folder (cakephp or whatever your application folder) to / home / username. This will cause the folder of your boot disk to be / home / username / bin, etc.  
  • Delete the public_html folder and create a new symbolic link public_html pointing to / home / username / webroot

What all!

+1
source

All Articles