Control Web Panel

WebPanel => PHP Selector => Topic started by: WISTFUL on January 27, 2026, 03:43:38 PM

Title: Temporary downgrade of CWP pro to free version (emergency!)
Post by: WISTFUL on January 27, 2026, 03:43:38 PM
Due to internet restrictions imposed by the government of the country where my server is located, it was impossible to access the global internet for over 2 weeks.
This caused the control panel license to fail, modules such as PHP‑FPM Selector to be disabled, and 503 errors to be received on the hosted websites.

Error on the home page of php sites:
Quote
503 Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Error log:
Code: [Select]
[Fri Jan 23 18:35:35.229146 2026] [proxy:error] [pid 31248:tid 31296] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/alt/php-fpm72/usr/var/sockets/sabradid.sock (localhost:8000) failed
[Fri Jan 23 18:35:35.229618 2026] [proxy_fcgi:error] [pid 31248:tid 31296] [client x.x.x.x:58910] AH01079: failed to make connection to backend: localhost

Notes:

Questions:

Please answer my questions before disconnecting access to the global internet again!
Many thanks...
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: overseer on January 28, 2026, 12:51:47 AM
Sounds like a can of worms. Probably some workarounds you could do (tunneling, WireGuard VPNs) etc. -- but ultimately I wonder if it's worth the effort. Is there any reason you can't get a VPS in another country? Then only your management ability would be interrupted with situations like this -- your server would remain online & resilient.
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: WISTFUL on January 28, 2026, 02:45:08 AM
Sounds like a can of worms. Probably some workarounds you could do (tunneling, WireGuard VPNs) etc. -- but ultimately I wonder if it's worth the effort. Is there any reason you can't get a VPS in another country? Then only your management ability would be interrupted with situations like this -- your server would remain online & resilient.
The server must be internal so that local citizens can access it. There is no question of filtering that can be bypassed with a VPN, the entire internal network is disconnected from the global network! (The so-called national internet)
Even Starlink must be connected to the internal internet network so that the server can connect to it because its data center is national.

It usually can't be very long because it costs the government billions of dollars.

There is no other way but to temporarily switch between the free and pro versions. If you can guide me in this area, you have helped me a lot.
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: overseer on January 28, 2026, 01:15:57 PM
Unfortunately I only ever used the free version 5 years ago to demo CWP and quickly paid for Pro once I verified it could act as a drop-in replacement for cPanel and in fact do a full account migration. I haven't looked back and rely on many of the Pro-level features (PHP-FPM, nginx...) This would take some time and care to get you stable under the free version. Have you considered doing a clean server install and running Webmin and/or Cockpit as your web GUI? That's workable if you have experience managing a server.
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: WISTFUL on January 29, 2026, 12:39:22 AM
It's strange that no one has ever found such a need, and the cwp programmers didn't provide a guide or solution for it!  ???
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: overseer on January 29, 2026, 03:25:01 PM
Not saying it can't be done, just that I personally haven't done it. So it would need to be worked through. I know some forum members get by on the free version of CWP, so maybe they could chime in here.
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: WISTFUL on January 29, 2026, 10:27:27 PM
This is the solution provided by AI based on my operating system specifications and CWP configuration:
Do you think there's anything in it that needs optimization or could cause problems later?

Step 1: Full Backup

1. Backup websites:
   
Code: [Select]
cp -r /home/* /backup/cwp_sites/
2. Backup databases:
   
Code: [Select]
mysqldump -u root -p --all-databases > /backup/all_databases.sql
3. Backup configurations:
   
Code: [Select]
cp -r /usr/local/cwpsrv/ /backup/cwpsrv/
   cp -r /etc/php-fpm.d/ /backup/php-fpm/
   cp -r /etc/httpd/conf/ /backup/httpd_conf/
   cp -r /etc/nginx/conf.d/ /backup/nginx_conf/

Note: The [/backup] path can be located on a separate disk or another server.



Step 2: Check and install PHP 7.4

1. Check installed versions:
   
Code: [Select]
rpm -qa | grep alt-php
2. If PHP 7.4 is not installed, install it:
   
Code: [Select]
yum install alt-php74 alt-php74-php-fpm alt-php74-php-cli -y


Step 3: Enable and start PHP-FPM 7.4
Code: [Select]
systemctl enable --now php-fpm74
systemctl status php-fpm74

Note: If the service is not active or shows errors, investigate and fix it before continuing.



Step 4: Create socket directory

• Default socket path:
Code: [Select]
/opt/alt/php-fpm74/usr/var/sockets/<sitename>.sock
• If it does not exist:
Code: [Select]
mkdir -p /opt/alt/php-fpm74/usr/var/sockets
chown -R cwpsrv:cwpsrv /opt/alt/php-fpm74/usr/var/sockets
systemctl restart php-fpm74



Step 5: Rebuild CWP configuration for PHP-FPM
Code: [Select]
/usr/local/cwp/php-fpm-rebuild
systemctl restart httpd
systemctl restart nginx
systemctl restart varnish



Step 6: Check and fix Nginx → Varnish → Apache configuration

1. In the Nginx config file for each site, point [fastcgi_pass] to the fixed PHP-FPM socket:
   
Code: [Select]
fastcgi_pass unix:/opt/alt/php-fpm74/usr/var/sockets/<sitename>.sock;
2. Restart Varnish to clear cache:
   
Code: [Select]
systemctl restart varnish


Step 7: Test websites

1. Create an [info.php] file:
   
Code: [Select]
<?php phpinfo(); ?>
2. Check in the browser and make sure it loads without a 503 error.



Step 8: Preparation for returning to Pro

1. Keep the full backup.
2. After activating Pro:
   
Code: [Select]
/usr/local/cwp/upgrade_to_pro
Or via CWP panel → License Activation

3. Check Selector / Version Switcher and enable it
4. If newer PHP versions are needed, use Selector in CWP Pro
5. Restart services:
   
Code: [Select]
systemctl restart php-fpm74
   systemctl restart httpd
   systemctl restart nginx
   systemctl restart varnish



Step 9: Final notes

• Recommended PHP version in Free: 7.4
• All sites are set to one fixed version so Selector in Pro will work smoothly later
• Keep backups until Pro is reactivated and all sites are stable
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: Martins-phpbb on January 30, 2026, 12:19:01 AM
Cant you just login here https://support.centos-webpanel.com/index.php?rp=/login and put a bs ip in the box and when cwp does it's sweep your pro will be disabled then you can just use the free features only.

Or am i reading what you want wrong ?
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: overseer on January 30, 2026, 12:50:11 AM
I wouldn't trust AI to be your guiding light. For example, just at a quick glance, it is giving you the wrong ownership for the PHP socket. It should be:
Code: [Select]
chown root:nobody /opt/alt/php-fpm74/usr/var/sockets/<username>.sockAnd seemingly, it isn't telling you to initially create the <username>.conf file for each user account with the correct user & group within, as well as the correct paths? Even with CWP Pro, you have to manually create the php-fpm user conf files for each PHP version.
Code: [Select]
[username]
listen = /opt/alt/php-fpm74/usr/var/sockets/username.sock
listen.allowed_clients = 127.0.0.1

;listen.owner = "username"
listen.group = "nobody"
listen.mode = 0660
user = "username"
group = "username"

;request_slowlog_timeout = 15s
;slowlog = /opt/alt/php-fpm74/usr/var/log/php-fpm-slowlog-username.log

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 15s

;listen.backlog = -1
;request_terminate_timeout = 0s
rlimit_files = 131072
rlimit_core = unlimited
catch_workers_output = yes

env[HOSTNAME] = $HOSTNAME
env[TMP] = /home/username/tmp
env[TMPDIR] = /home/username/tmp
env[TEMP] = /home/username/tmp
env[PATH] = /usr/local/bin:/usr/bin:/bin
Any reason you're looking at php 7.4? Unless you have older WordPress themes/extensions that require it for full compatibility, it is EOL and probably contains security vulnerabilities. Look to 8.1 if you are using WP, or 8.3 if you need a fully supported PHP version.
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: WISTFUL on January 30, 2026, 01:34:40 AM
Cant you just login here https://support.centos-webpanel.com/index.php?rp=/login and put a bs ip in the box and when cwp does it's sweep your pro will be disabled then you can just use the free features only.

Or am i reading what you want wrong ?
When (in my particular situation) the internet is nationalized, there is no connection from the server inside the country to the outside (to access the CWP license server) and as a result, the license is automatically deactivated and CWP is downgraded to the free version. With the PHP‑FPM Selector disabled on the free version, we will receive a 503 error on PHP sites.

This topic is to fix errors when downgrading CWP to the free version (for any reason) by manually installing Alt-PHP and allowing you to revert back to the pro version with the least possible challenge.
Title: Re: Temporary downgrade of CWP pro to free version (emergency!)
Post by: WISTFUL on January 30, 2026, 01:54:42 AM
I wouldn't trust AI to be your guiding light. For example, just at a quick glance, it is giving you the wrong ownership for the PHP socket. It should be:
Code: [Select]
chown root:nobody /opt/alt/php-fpm74/usr/var/sockets/<username>.sockAnd seemingly, it isn't telling you to initially create the <username>.conf file for each user account with the correct user & group within, as well as the correct paths? Even with CWP Pro, you have to manually create the php-fpm user conf files for each PHP version.
Oh! It was predictable.
The AI ​​has no knowledge of CWP and often uses cPanel addresses for it. The guide that was posted is the result of a long conversation about describing the problem and forcing chatGPT to use the official resources provided by the site https://control-webpanel.com, taking into account the experiences of users on its forum.

Quote
Any reason you're looking at php 7.4? Unless you have older WordPress themes/extensions that require it for full compatibility, it is EOL and probably contains security vulnerabilities. Look to 8.1 if you are using WP, or 8.3 if you need a fully supported PHP version.
Unfortunately, a number of users are using old WordPress. Either I have to choose the middle ground or roll up my sleeves to dig up the dead WordPress... ;D

If you revise the relevant guide based on your knowledge and experiences with CWP, it will be a unique reference to help me and others who encounter the same problem.