Once the files have been put back into public and you've run the installer, move them back to the root, and ensure config.php looks like this
<?php return array (
'debug' => false,
'database' =>
array (
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'your_database',
'username' => 'your_database_username',
'password' => 'your_database_password',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'port' => '3306',
'strict' => false,
),
'url' => 'your_root_url',
'paths' =>
array (
'api' => 'api',
'admin' => 'admin',
),
);
You should also modify the flarum file (in the same directory) so that it looks like the below
#!/usr/bin/env php
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require 'vendor/autoload.php';
$server = new Flarum\Console\Server(
Flarum\Foundation\Site::fromPaths([
'base' => __DIR__,
'public' => __DIR__,
'storage' => __DIR__.'/storage',
])
);
$server->listen();
Then, go to the root of your site, and that should be it.
Taken from this snippet
Simply move all the files inside the public directory (including .htaccess) into the directory you want to serve Flarum from. Then edit .htaccess and uncomment lines 9-14 in order to protect sensitive resources. Finally, edit both index.php and the flarum executable, and update the paths in the following lines to reflect your new directory structure: