From a ZIP file to a fully running news portal with 30 articles, 17 users, and 80 tags — in under 5 minutes. Choose your operating system below.
You need PHP 8.2, MySQL 8, and Composer. The easiest way is Laragon — one installer, everything included.
PHP 8.2 + MySQL + Composer in one click
RecommendedClassic choice, use PHP 8.2 version
PopularOfficial Laravel local environment
Laravel OfficialAfter installing Laragon, click Start All from the Laragon tray icon before proceeding.
Unzip the downloaded newsportal.zip and place the newsportal folder into your web root:
| Environment | Web Root Path |
|---|---|
| Laragon | C:\laragon\www\newsportal\ |
| XAMPP | C:\xampp\htdocs\newsportal\ |
| WAMP | C:\wamp64\www\newsportal\ |
Open your environment's terminal (right-click the Laragon tray icon → Terminal), navigate to the project folder and run:
cd C:\laragon\www\newsportal
setup.bat
The script will prompt you for database credentials and do everything automatically:
news_portal databasecomposer installAfter setup, the script asks if you want to start the server. Press Y or run manually:
php artisan serve
INFO Server running on http://127.0.0.1:8000
With Laragon you can also access the site via http://newsportal.test without running artisan serve — Laragon creates virtual hosts automatically.
Change the admin password immediately after first login in any non-local environment.
Ubuntu / Debian:
# Add PHP 8.2 repository
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
# Install PHP and required extensions
sudo apt install php8.2 php8.2-cli php8.2-mysql php8.2-mbstring \
php8.2-xml php8.2-gd php8.2-zip php8.2-bcmath php8.2-curl -y
# Install MySQL
sudo apt install mysql-server -y
sudo mysql_secure_installation
macOS (Homebrew):
# Install PHP and MySQL
brew install php mysql composer
brew services start mysql
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer --version
# Extract the zip
unzip newsportal.zip -d /var/www/
cd /var/www/newsportal
# Run the one-command setup
chmod +x setup.sh
./setup.sh
Follow the prompts to enter your database credentials. The script handles the rest.
php artisan serve --host=0.0.0.0 --port=8000
For a production server with Nginx, see Server Configuration in the docs.
Your host must support PHP 8.2+ and MySQL 8.0+ and allow SSH access for Composer. Most modern cPanel hosts do. Check with your provider if unsure.
In cPanel → MultiPHP Manager or PHP Selector, set PHP to 8.2 and ensure these extensions are enabled: pdo_mysql, mbstring, xml, gd, zip, bcmath, curl.
In cPanel → MySQL Databases:
mysite_newsportalUpload newsportal.zip via cPanel File Manager to your document root (public_html/ or a subdirectory), then extract it.
The Laravel public/ folder should be your web root. You may need to point your domain to newsportal/public/ in cPanel → Domains.
# SSH into your server, then:
cd /home/username/public_html/newsportal
cp .env.example .env
nano .env # fill in DB credentials
Set DB_DATABASE, DB_USERNAME, DB_PASSWORD to your cPanel database details.
composer install --no-dev --optimize-autoloader
php artisan key:generate
php artisan migrate --seed
php artisan config:cache
php artisan route:cache
chmod -R 755 storage bootstrap/cache public/uploads
chown -R www-data:www-data storage bootstrap/cache
Visit your domain. Admin at yourdomain.com/admin — login with admin@example.com / password. Change your password immediately.
Visit platform.openai.com/api-keys and create a new API key. The recommended model is gpt-4o-mini — it's fast and very cost-effective.
Go to Admin → Settings → AI, paste your API key, select the model, then flip Enable AI Features ON.
Toggle each AI feature individually: Summary, Tags, SEO, Related Articles. You can enable only what you need.
# Enrich all seeded articles with AI
php artisan news:process-ai
Processing 30 articles...
████████████████████ 30/30
✅ Done! 30 articles enriched.
Go to Admin → Settings → Email, toggle Use Custom SMTP ON, and enter your details. Here are quick configs for popular providers:
Host: smtp.gmail.com
Port: 587
Encryption: TLS
Username: you@gmail.com
Password: App Password (not your Gmail password)
Generate a Gmail App Password at: myaccount.google.com/apppasswords
Host: sandbox.smtp.mailtrap.io
Port: 2525
Encryption: TLS
Username: your mailtrap username
Password: your mailtrap password
Host: smtp.mailgun.org
Port: 587
Encryption: TLS
Username: postmaster@yourdomain.com
Password: your mailgun SMTP password
# View full site statistics
php artisan news:stats
# Run AI on all unprocessed articles
php artisan news:process-ai
# Re-process a specific article by ID
php artisan news:reprocess-ai 5
# Send newsletter to all confirmed subscribers
php artisan news:send-newsletter "Weekly Digest"
# Preview newsletter without sending
php artisan news:send-newsletter "Weekly Digest" --preview
# Publish all scheduled articles
php artisan news:publish-scheduled
# Delete all spam comments
php artisan news:clear-spam
# Clear all caches (run after changing .env)
php artisan config:clear
php artisan cache:clear
php artisan view:clear
# Reset the database and reseed (dev only!)
php artisan migrate:fresh --seed
You have a fully-functioning AI-powered news portal. Now head to Admin and start creating your first real article.
| Role | |
|---|---|
| Admin | admin@example.com |
| Editor | james.editor@example.com |
| Author | alex.author@example.com |
| Reader | emma@example.com |
password