Comprehensive DeployHQ Guide for ClassicPress
Intro
ClassicPress is a business-focused content management system (CMS) that forked from WordPress 4.9.x. It maintains compatibility with many WordPress plugins and themes while focusing on stability, security, and minimal resource usage.
Here are some key features of ClassicPress:
- Stability: ClassicPress prioritizes reliable, tested features over constant changes
- Security: Enhanced security features and regular security updates
- Performance: Optimized for speed and efficiency
- Business-focused: Designed with business needs in mind
- Open-source: Free to use, modify, and distribute
- WordPress compatibility: Works with many existing WordPress plugins and themes
ClassicPress is ideal for businesses and developers who want a stable, secure CMS without the frequent changes and complexity of modern WordPress.
1. Set Up ClassicPress Project
Install ClassicPress using the official method:
# Download ClassicPress
wget https://www.classicpress.net/latest.zip
unzip latest.zip
Initialize a Git repository:
git init
git add .
git commit -m "Initial ClassicPress setup"
Create a .gitignore
file:
/wp-content/uploads/*
/wp-content/cache/*
/wp-content/backup-db/*
/wp-content/upgrade/*
wp-config.php
.env
2. Set Up DeployHQ
- Create a DeployHQ account at https://www.deployhq.com/
- Create a new project in DeployHQ
- Connect your Git repository (GitHub, GitLab, Bitbucket, or custom)
3. Configure Deployment in DeployHQ
Go to "Servers & Groups"
Add a new server:
- Choose protocol (SFTP recommended)
- Enter server details (hostname, username, password/key)
- Set deployment path
- Create a new deployment:
- Select branch to deploy
- Choose the server
- Set up automatic deployments if desired
4. Environment Configuration
Create a wp-config-sample.php
file:
<?php
define('DB_NAME', '{{DB_NAME}}');
define('DB_USER', '{{DB_USER}}');
define('DB_PASSWORD', '{{DB_PASS}}');
define('DB_HOST', '{{DB_HOST}}');
define('WP_HOME', '{{SITE_URL}}');
define('WP_SITEURL', '{{SITE_URL}}');
define('AUTH_KEY', '{{AUTH_KEY}}');
define('SECURE_AUTH_KEY', '{{SECURE_AUTH_KEY}}');
define('LOGGED_IN_KEY', '{{LOGGED_IN_KEY}}');
define('NONCE_KEY', '{{NONCE_KEY}}');
define('AUTH_SALT', '{{AUTH_SALT}}');
define('SECURE_AUTH_SALT', '{{SECURE_AUTH_SALT}}');
define('LOGGED_IN_SALT', '{{LOGGED_IN_SALT}}');
define('NONCE_SALT', '{{NONCE_SALT}}');
5. Build Pipeline Configuration
Create .deploybuild.yaml
:
build_languages:
- name: "node"
version: "18"
- name: "php"
version: "7.4"
build_commands:
- description: "Install Dependencies"
command: "composer install --no-dev --optimize-autoloader"
halt_on_error: true
build_cache_files:
- path: vendor/**
6. Deployment Hooks
Configure Post Deploy SSH Commands:
#!/bin/bash
wp cache flush
chmod 755 wp-content/uploads -R
chmod 644 wp-config.php
7. Server Environment Setup
Ensure your server meets ClassicPress requirements: * PHP 7.0+ (7.4+ recommended) * MySQL 5.6+ or MariaDB 10.1+ * Apache with mod_rewrite or Nginx
For Nginx, use this configuration:
server {
listen 80;
server_name yourdomain.com;
root /path/to/classicpress;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
8. Database Setup
- Create a MySQL database for ClassicPress
- Note credentials for environment variables
- Consider using a separate database user with limited privileges
9. Deployment
- Push your changes to the connected Git repository
- In DeployHQ, go to "Deployments" and click "Deploy Now"
- Monitor the deployment process
10. ClassicPress Installation
After deployment: 1. Access your site URL 2. Follow the ClassicPress installation wizard 3. Enter database information 4. Create an admin account 5. Configure basic settings
11. Post-Installation
- Set up SSL/TLS
- Configure WP-Cron (recommended to disable default and use system cron):
*/15 * * * * wget -q -O /dev/null https://yourdomain.com/wp-cron.php?doing_wp_cron
- Regular updates and backups
12. Continuous Deployment
- Set up automatic deployments in DeployHQ
- Configure notifications for successful/failed deployments
- Use DeployHQ's rollback feature if needed
13. Performance Optimization
- Enable OpCache
- Use a caching plugin
- Implement CDN
- Optimize database regularly
- Use proper image optimization
This guide has been adapted specifically for ClassicPress, taking into account its unique features and requirements while maintaining the deployment workflow through DeployHQ.
Want to learn more about deployment or Wordpress? Check out our documentation or contact our support team for assistance.