65 lines
1.3 KiB
Markdown
65 lines
1.3 KiB
Markdown
# PHPStarter CLI
|
||
|
||
A lightweight command‑line tool for generating new PHP websites based on the [PHPStarter](https://gitea.ramoncaballero.dev/mon/PHPStarter.git) template.
|
||
|
||
You get a fully working PHP project in seconds.
|
||
|
||
## Requirements
|
||
|
||
- Linux environment
|
||
- Apache2
|
||
- Git
|
||
- Bash
|
||
- PHP
|
||
- Composer
|
||
- MariaDB
|
||
|
||
## Installation
|
||
|
||
Clone this repository:
|
||
|
||
```bash
|
||
git clone https://gitea.ramoncaballero.dev/mon/phpstarter-cli.git
|
||
cd phpstarter-cli
|
||
```
|
||
|
||
Make the script executable:
|
||
|
||
```bash
|
||
chmod +x phpstarter.sh
|
||
```
|
||
|
||
<!-- (Optional) Install globally: -->
|
||
<!-- -->
|
||
<!-- ```bash -->
|
||
<!-- sudo cp phpstarter.sh /usr/local/bin/phpstarter -->
|
||
<!-- ``` -->
|
||
|
||
## Usage
|
||
|
||
Create a new PHP site:
|
||
|
||
```bash
|
||
sudo ./phpstarter.sh <mysite>
|
||
```
|
||
|
||
This will clone the [PHPStarter](https://gitea.ramoncaballero.dev/mon/PHPStarter.git) template, configure everything automatically, and set up a ready‑to‑use local development environment for your new site.
|
||
|
||
Your new site will be available at:
|
||
|
||
```bash
|
||
http://mysite.local
|
||
```
|
||
|
||
## Remove a Site
|
||
|
||
```bash
|
||
sudo rm -rf /var/www/sites/mysite
|
||
sudo a2dissite mysite.conf
|
||
sudo rm /etc/apache2/sites-available/mysite.conf
|
||
sudo systemctl reload apache2
|
||
sudo sed -i '/mysite\.local/d' /etc/hosts
|
||
```
|
||
|
||
You may also remove the database it manually if you no longer need it.
|