Wednesday, June 10, 2015

PLESK: How-to change subscription expiry to unlimited via command line in

Sometimes you may discover that domains suspending for no reason every day !

Or subscriptions get automatically disabled when statistics are recalculated. This happens for several subscriptions.

We faced this! even while subscriptions are assigned to a custom plan where resource over usage is allowed!

Reason:
In Parallels Plesk control panel subscriptions get suspended automatically if their expiration date passes.

Plesk does not renew subscriptions automatically, so it suspends a subscription when the subscription expiration date comes. By default, the expiration date is "Setup date + 1 year".

As I mentioned in my previous post How to Activate Subscription via command line in PLESK for windows

in Parallels PLESK - Web Admin Edition you don't have a tap to manage subscriptions, so you will have to do it via command line

To check the expiry status for your hosted domains:

Open CMD and type the following in one line:
C:\Program Files (x86)\Parallels\Plesk\admin\bin>dbclient --direct-sql --

sql="SELECT domains.name,limits.value,limits.limit_name FROM

limits,subscriptionproperties INNER JOIN subscriptions ON

subscriptionproperties.subscription_id = subscriptions.id INNER JOIN domains

ON subscriptions.object_id = domains.id WHERE subscriptionproperties.name =

'limitsId' AND limits.limit_name = 'expiration' AND

subscriptionproperties.value = limits.id;"


Now, to change subscription expiry to unlimited via command line type the following:
C:\Program Files (x86)\Parallels\Plesk\admin\bin>subscription_settings.exe -u
mydomain.com -expiration -1

and you are done :)

How to Activate Subscription via command line in PLESK for windows

Hi,

Few days ago I faced a problem on one of my servers, the server running with Parallels PLESK 12 - Web Admin Edition.

in Web Admin Edition you don't have a tap to manage subscriptions, one of my hosted domain suddenly suspended with no reason, when I tried to activate it I got an Error msg that the domain has been suspended by my Hosting provider and I can'y active it. WHAT !! I'm on my own server!

I searched in every link in the Plesk control panel and didn't found anyway to activate it!

the only solution was to activate it via command line as following:

Activate Subscription:
C:\Program Files (x86)\Parallels\Plesk\bin>domain.exe --webspace-on mydomain.com

Successfully activated

That fixed the problem and the domain become active now, but it was only for one day :(

The next day the domain got suspended again!

Find out why this happened an how I fixed it permanently in the next post.