Example.com does not exist in database

For the most part, I’ve followed the instructions found at http://community.easyengine.io/t/how-to-change-domain-with-existing-ee-setup/1848 to change the domain name, of an existing WordPress website, setup by Easy Engine.

I did not export the database, as I wish to use the existing database with the new domain name.

Every attempt running the command:

sudo ee site enable example.com

…results in the error: example.com does not exist in database

What database is this referencing and where should example.com exist?


This refers to the EasyEngine database located at /var/lib/ee/ee.db.

As you have not created example.com with ee site create command its entry is missing in ee.db resulting in above error.

If you are using EasyEngine 3.0.5

I would suggest some steps :

I assume that you want to update example.com to example1.com

step 1:

create site example1.com with similar type of your example.com , I assume its wp

`ee site create example1.com --wp`

Step 2:

Remove example1.com webroot. rm -rf /var/www/example1.com

Step3 :

Rename /var/www/example.com to /var/www/example1.com

mv /var/www/example.com /var/www/example1.com

Please Note that perform above steps by maintaining proper backup for all files and database,

Also This solution is temporary for current situation only.

Thanks @harshadyeola

I will give this a shot, though it seems this type of move is something many people would like to do. Staging websites in a dev/test area before launching them as an “official” or “live” version, is a common practice. Why not build in a command, such as:

ee site changedomain example.com example1.com

…whereas example.com is the dev or test website’s domain and example1.com is the official or live website’s domain?

This command could change the existence of example.com in all locations, to example1.com, in an automated fashion.

WARNING: for those who may stumble on this discussion via search, this command is hypothetical and IS NOT currently a working command.

Unfortunately, your recommendations leaves me with another problem…

Error establishing a database connection

Now what?


Can you tell me exactly, what commands you did follow?


Thanks for your willingness to help, but I was able to finally figure out why the:

 Error establishing a database connection

…error was occurring. This error was a result of how the basic Database Name, Database Username and Database User Password are set up, by each of the various utilities.

When creating a website with ee, the input is quite easy. I choose the Database Name, Database Username and Database User Password ahead of time, note them in a secure space, and then copy/paste them into the ee interface. It works without a hitch.

However, the ee interface handles the characters in these names differently than the MySQL command line, phpMyAdmin and other Database utilities handle them. Some characters are not treated equally when using the same copy/paste method to change the Database Name, Database Username and Database User Password.

I’m not going to go into a lot of detail about this, to protect the naming convention and scheme I use, it should suffice to strongly suggest even when viewing the Database Name, Database Username and Database User Password in the wp-admin.php and matching them up in the MySQL command line or phpMyAdmin, even if they appear to be the same, THEY MAY NOT BE!

I was able to change the Database Name, Database Username and Database User Password and this error went away. I was also able to delete the website and use ee to create the website again, using the same convention and scheme I used before and the error never showed back up.

FYI: this issue was NOT an instance of a typo or fat fingers :wink:

Hi @bamajr

It’s been a long time, and we haven’t heard from you. It looks like your issue is resolved.

I am closing this support topic for now. Feel free to create a new support topic if you have any queries further. :slight_smile: