Tips & Tricks
Transferring Site
Sometimes you might have a need to copy the whole website including settings and data to a new hosting server. Here is the set of instructions on how to do this. The very first step is to copy all your files from your cms pro location to a new server. There are several ways to do that:
- pack files in the cPanel file manager and then move and unpack them on your new server
- pack files in SSH using any shell package command like tar, gzip, etc.
- download files using FTP to your local PC and then upload them to a new location
The second step is to transfer your MySQL database. You can do that in your hosting phpMyAdmin. Make a full backup of your cms pro database and import it in your new website database.
After you do the steps described above, you should make the final changes:
- update site directory
site_dirfield insettingstable from phpMyAdmin, only if moving site to a different folder. - configure your lib/config.ini.php file and put your new database details there
- configure your .htaccess file with a new RewriteBase path (if needed)
That's all. Open your website in your browser – it should work fine.
.htaccess Configuration
Options -MultiViews
RewriteEngine On
Options -Indexes
RewriteBase /
#Remove extra trailing slashes
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
<ifModule mod_deflate.c>
<filesmatch "\.(js|css|html|jpg|png|gif|eot|woff|ttf|svg)$">
SetOutputFilter DEFLATE
</filesmatch>
</ifModule>
<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|cache|tpl)$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch index.php>
Order Allow,Deny
Allow from all
</FilesMatch>
nginx Configuration
autoindex off;
location / {
rewrite ^(.*)/{2,}(.*)$ /%1/%2 redirect;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
}
location ~ \.(htaccess|htpasswd|ini|log|sh|inc|bak|cache|tpl)$ {
deny all;
}
location ~ index.php {
allow all;
}
Cache Folders
Wojo Framework pro uses several cache folders to speed up page loading time. Instead of loading multiple CSS and JavaScript files, all files are compressed and loaded as one single file
When modifying CSS files do not change anything in /view/admin/cache/ or
/view/front/themes/current_theme/cache/
Instead, modify individual CSS files located in /view/admin/css/ or
/view/front/themes/current_theme/css/
Cached file master_main.css will be automatically updated.
Setting Up CronJob
HTTP-BASED CRON JOBS FOR cPANEL/PLESK
1. Add these 7 cron jobs to your cPanel/Plesk control panel
2. Replace YOUR_DOMAIN with your actual domain
3. Replace CRON_KEY with your security key found in config/conf.php (ask
admin if unsure)
4. If you have a shared hosting, you can use the wget command. If you have a VPS or dedicated server, you can use the CLI command.
5. Log files are automatically generated and stored in logs/.
7 CRON JOBS TO ADD
1. CRYPTO VERIFICATION (Every 5 minutes)
Verify pending blockchain payments
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=crypto-verify&key=CRON_KEY"
CLI: php artisan cron:run --task=crypto-verify
System: */5 * * * * /usr/bin/php /path/to/artisan cron:run --task=crypto-verify 2>/dev/null
Log file: logs/crypto-verification.log
2. MEMBERSHIP EXPIRATION (Daily at 8 AM)
Send 3-day reminders & expiry notice
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=membership-expiration&key=CRON_KEY"
CLI: php artisan cron:run --task=membership-expiration
System: 0 8 * * * /usr/bin/php /path/to/artisan cron:run --task=membership-expiration 2>/dev/null
Log files:
- logs/membership-expiration.log
- logs/membership-expiration-sent.log (tracking)
3. TRASH CLEANUP (Monthly on 1st at 2 AM)
Delete trash older than 30 days
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=trash-cleanup&key=CRON_KEY"
CLI: php artisan cron:run --task=trash-cleanup
System: 0 2 1 * * /usr/bin/php /path/to/artisan cron:run --task=trash-cleanup 2>/dev/null
Log file: logs/trash-cleanup.log
4. CRYPTO CLEANUP (Daily at 3 AM)
Delete expired crypto payments (30+ days)
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=crypto-cleanup&key=CRON_KEY"
CLI: php artisan cron:run --task=crypto-cleanup
System: 0 3 * * * /usr/bin/php /path/to/artisan cron:run --task=crypto-cleanup 2>/dev/null
Log file: logs/crypto-cleanup.log
5. PAYMENT RETRY (Every 30 minutes)
Retry failed one-time payments
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=payment-retry&key=CRON_KEY"
CLI: php artisan cron:run --task=payment-retry
System: */30 * * * * /usr/bin/php /path/to/artisan cron:run --task=payment-retry 2>/dev/null
Log file: logs/payment-retry.log
6. LOG CLEANUP (Weekly Sun, 2 AM)
Prune log files older than 60 days
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=log-cleanup&key=CRON_KEY"
CLI: php artisan cron:run --task=log-cleanup
System: 0 2 * * 0 /usr/bin/php /path/to/artisan cron:run --task=log-cleanup 2>/dev/null
Log file: logs/log-cleanup/
7. OFFLINE CLEANUP (Daily 4 AM)
Delete abandoned offline payments (14+ days, no proof)
wget -q -O /dev/null "https://YOUR_DOMAIN/cron?task=offline-cleanup&key=CRON_KEY"
CLI: php artisan cron:run --task=offline-cleanup
System: 0 4 * * * /usr/bin/php /path/to/artisan cron:run --task=offline-cleanup 2>/dev/null
Log file: logs/offline-cleanup/