• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Plesk bin site error when creating a domain from bash script

Im having an issue creating a domain on plesk, this command works fine when run through cli:

```plesk bin site --create newdomain.com -webspace-name existingdomain.com -www-root /httpdocs```

But when I add the same code above to a bash script (create_domain.sh) and try to run it with:

```sudo bash create_domain.sh```

I get the following error

```An error occurred during domain creation: hosting update is failed: cObject->update() failed: Some fields are empty or contain an improper value. ('www_root' = ')```

Anyone knows why this is happening?

I tried /usr/local/psa/bin/site instead of plesk bin site and I get the same issue
 
Works fine with this content of bash script:

Code:
# cat d.sh
#!/bin/sh
plesk bin site --create newdomain.com -webspace-name existingdomain.com -www-root /httpdoc

# sh d.sh
SUCCESS: Creation of domain 'newdomain.com' completed.
 
Works fine with this content of bash script:

Code:
# cat d.sh
#!/bin/sh
plesk bin site --create newdomain.com -webspace-name existingdomain.com -www-root /httpdoc

# sh d.sh
SUCCESS: Creation of domain 'newdomain.com' completed.
Thanks for getting back to me, I still get this error

An error occurred during domain creation: hosting update is failed: cObject->update() failed: Some fields are empty or contain an improper value. ('www_root' = ')var/www/vhosts/clientfunnels.io/httpdocs

Is there something wrong with my install?
 
Some fields are empty or contain an improper value.
There are many possible reasons for this error, you can check it with KB article search by this quoted phrase.
One of this reason may be a database inconsistency. Try to fix it with

# plesk repair db

Or check possible solutions from KB articles.
 
Back
Top