- PHP >= 5.6.4
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
1- Create a new directory alongside public_html/ directory (public_html directory in some hosts maybe different name like www).
2- Copy all your application source code except public directory in new directory (for example directory name is project).
3- Copy all contents inside the public/ directory to public_html/ directory.
4- Modify public_html/index.php as follows:
require __DIR__.'/../project/bootstrap/autoload.php';
$app = require_once __DIR__.'/../project/bootstrap/app.php';
$app->bind('path.public', function() {
return __DIR__;
});
5- Set 777 permissions for project/storage and project/bootstrap/cache directories.
6- Modify .env file according to your host information such as database, mail, cache, ...
APP_ENV=production
APP_KEY=base64:q+MEY0Z5Uf/N4icj4oDEmXtZPD6jOzJu4++BUToOz8U=
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=http://your-domain.com
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=your-database-name
DB_USERNAME=your-user-name
DB_PASSWORD=your-password
7- Open your-domain.com in browser And you're good to go !
Thanks!