vito/app/SSH/Wordpress/Wordpress.php
Saeed Vaziry 428140b931
refactoring (#116)
- refactoring architecture
- fix incomplete ssh logs
- code editor for scripts in the app
- remove Jobs and SSHCommands
2024-03-14 20:03:43 +01:00

32 lines
903 B
PHP

<?php
namespace App\SSH\Wordpress;
use App\Models\Site;
use App\SSH\HasScripts;
class Wordpress
{
use HasScripts;
public function install(Site $site): void
{
$site->server->ssh()->exec(
$this->getScript('install.sh', [
'path' => $site->path,
'domain' => $site->domain,
'db_name' => $site->type_data['database'],
'db_user' => $site->type_data['database_user'],
'db_pass' => $site->type_data['database_password'],
'db_host' => 'localhost',
'db_prefix' => 'wp_',
'username' => $site->type_data['username'],
'password' => $site->type_data['password'],
'email' => $site->type_data['email'],
'title' => $site->type_data['title'],
]),
'install-wordpress'
);
}
}