3.4 KiB
3.4 KiB
Windows Setup Guide for UK Data Services Website
Quick Setup with XAMPP (Recommended)
Step 1: Install XAMPP
- Download XAMPP from: https://www.apachefriends.org/download.html
- Choose "XAMPP for Windows" (latest version with PHP 8.1+)
- Run the installer as Administrator
- Install to default location:
C:\xampp - During installation, select: Apache, PHP, MySQL (others optional)
Step 2: Setup Website Files
- Navigate to:
C:\xampp\htdocs\ - Create a new folder called:
ukdataservices - Copy ALL files from your
ukdataservices-newfolder into:C:\xampp\htdocs\ukdataservices\
Your structure should look like:
C:\xampp\htdocs\ukdataservices\
├── index.php
├── quote.php
├── case-studies.php
├── about.php
├── contact-handler.php
├── quote-handler.php
├── .htaccess
├── assets\
│ ├── css\
│ ├── js\
│ └── images\
└── logs\ (will be created automatically)
Step 3: Configure Apache
- Open
C:\xampp\apache\conf\httpd.confin a text editor - Find the line:
#LoadModule rewrite_module modules/mod_rewrite.so - Remove the
#to enable URL rewriting:LoadModule rewrite_module modules/mod_rewrite.so - Save the file
Step 4: Start Services
- Open XAMPP Control Panel (run as Administrator)
- Click "Start" next to Apache
- Apache should show as "Running" with green highlighting
- If you get port conflicts, click "Config" → "Apache (httpd.conf)" and change port from 80 to 8080
Step 5: Test Your Website
- Open web browser
- Go to:
http://localhost/ukdataservices/ - You should see your professional UK Data Services homepage
Step 6: Enable Email Functionality (Optional)
To test contact forms, you'll need to configure email:
- Edit
C:\xampp\php\php.ini - Find the [mail function] section
- Configure SMTP settings or use a service like MailHog for testing
Alternative: Quick PHP Server (No Installation)
If you have PHP installed:
- Open Command Prompt
- Navigate to your website folder:
cd C:\Users\Peter\Desktop\ukdataservices-new - Run:
php -S localhost:8000 - Access via:
http://localhost:8000
Troubleshooting
Apache Won't Start
- Port 80 in use: Change Apache port to 8080 in httpd.conf
- Skype conflict: Disable Skype's use of port 80/443
- Windows firewall: Allow Apache through firewall
.htaccess Issues
- Enable mod_rewrite in Apache configuration
- Check file permissions on .htaccess
PHP Errors
- Enable error reporting in php.ini:
display_errors = On - Check PHP error log in XAMPP control panel
File Permissions
- Ensure the
logsfolder is writable - Run XAMPP as Administrator if needed
Production Deployment
When ready to go live:
- Purchase web hosting with PHP 7.4+ and Apache
- Upload all files via FTP/cPanel
- Update email addresses in contact-handler.php and quote-handler.php
- Install SSL certificate
- Update .htaccess to force HTTPS
Performance Tips
- Enable OpCache in PHP for better performance
- Use compression in Apache (.htaccess already configured)
- Optimize images if you replace the SVG placeholders
- Monitor the logs folder for form submissions
Security Notes
- The website includes security headers and input validation
- Rate limiting is implemented for forms
- Change default passwords if using MySQL
- Keep PHP and Apache updated
Your website is now ready to run locally for testing and development!