Cannot Install WordPress when Website has added domain in public_html

Salam n Hola.

I’ve got a website created, lets call it, .
No application installed.
Then i created a subdomain, using default path.
Thus, a folder called is created inside public_html.

I then try to install WordPress for
I the get an error message saying:
“Installation failed. Error message: Target directory should be empty before installation, otherwise data loss could occur. [404]”

Is this a bug or is it meant to behave like that?
We have to install WordPress before adding subdomains?

System Info:

  • MS Azure - 1CPU 1GB RAM 30GB SDD
  • CentOS 7.5
  • CyberPanel 1.8.7 minimal install, every thing else Y after that.

InsyaAllah and Thank You.

Your domain folder is not empty, thus WordPress install fails, it is to prevent data loss, so new files won’t override your existing content.

Yes… I understand that… but what if we’ve already added another domain into the folder before attempting to install WordPress…

This the what I have in public_html

++++ index.html
++ index.html

Basically, i’ve just added a subdomain and I can’t install WordPress…

Are you saying… I must install WordPress into the main domain before I can add a subdomain?

InsyaAllah n Thank You.

Yes, otherwise you would have to install manually.