• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

Change all Subscription Expiry Dates at Once

WbAdminSupport

New Pleskian
Hello,

We currently have a bunch of domains, on both windows and Linux Plesk 10 platforms. These domains all have expiry dates set for various times.

What I would like to do, is set all of these subscriptions for Unlimited. I have already adjusted the subscriptions themselves so future items will be set to Unlimited. However, I really would prefer to not have to go into each existing subscription and change its expiry date.

Can someone explain how to do this?

Thanks.
 
You can use something like this:

for i in `mysql -uadmin -p\`cat /etc/psa/.psa.shadow\` psa -Ns -e "select name from domains"`; do /usr/local/psa/bin/domain_pref -u $i -expiration 2020-12-30; done

Modify it for Windows.
 
Thanks IgorG.

One quick question about converting to windows. Would I simply replace the "/etc/psa" and the "/usr/local/psa/bin/" paths with the relevant windows paths. IE: c:\plesk for example?
 
Thanks IgorG.

One quick question about converting to windows. Would I simply replace the "/etc/psa" and the "/usr/local/psa/bin/" paths with the relevant windows paths. IE: c:\plesk for example?

Yes, but use Plesk admin's password instead of "\`cat /etc/psa/.psa.shadow\`". This command is just for getting admin's password from unix file /etc/psa/.psa.shadow
And cycle, of course, should be written in Windows context. I'm not familiar with Windows scripting, unfortunately.
 
Follow Up Question

I just had a quick follow up question for the piece of code posted earlier. It works like a charm, but I noticed that when I go back into the "Customize" under the domain where I would have changed the subscription time to a date or unlimited instead of having the normal "OK" button it now says "Update & Lock".

My question is is there a way to get this button back to just saying "OK"? I tried clicking on the "Update & Lock" button, which locks the account, and then used the "Unlock & Sync", but the button under "Customize" still says "Update & Lock".
 
Back
Top