How to manually delete site?


#1

I installed stack under root. Then tried to install site under regular user:

ee site create site.com --wpfc

As a result creation of DB failed.

Than I tried to delete site

ee site delete site.com --no-prompt
Deleting Database, None, user None
Error occured while deleting database

Only --files flags works:

ee site delete site.com --files

Plus I deleted configs from

/etc/nginx/sites-enabled
/etc/nginx/sites-available

But when I try to create site with the same name I get:

site *** already exists

#2

Now I can not create new sites

ee site create site.com --wpfc --user=*** --pass=*** --email=***

Running pre-update checks, please wait...
Setting up NGINX configuration  [Done]
Setting up webroot              [Done]
Downloading Wordpress           [Done]
Setting up database             224

Creation stops on database step.


#3

hello @gleb

could you please provide me output of

sudo tail /var/log/ee/ee.log

also make sure

~/.my.cnf

file is rightly configured .


#4
2015-07-27 09:16:34,797 (DEBUG) ee : logging initialized for 'ee' using LoggingLogHandler
2015-07-27 09:16:35,267 (DEBUG) ee : ['/usr/local/bin/ee', 'site', 'create', 'test.com.ua', '--wpfc', '--user=***', '--pass=***', '--email=***']
2015-07-27 09:16:35,268 (DEBUG) ee : collecting arguments/commands for <ee.cli.controllers.base.EEBaseController object at 0x7f7d73650cf8>
2015-07-27 09:16:35,280 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteController object at 0x7f7d73650ef0>
2015-07-27 09:16:35,284 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteCreateController object at 0x7f7d7365e860>
2015-07-27 09:16:35,289 (INFO) ee : Initializing EasyEngine Database
2015-07-27 09:16:35,300 (DEBUG) ee : Setting apt_packages variable for Nginx
2015-07-27 09:16:37,514 (DEBUG) ee : Finding string SCRIPT_FILENAME to file /etc/nginx/fastcgi_params
2015-07-27 09:16:37,523 (DEBUG) ee : Setting apt_packages variable for PHP
2015-07-27 09:16:39,891 (DEBUG) ee : Setting apt_packages variable for MySQL
2015-07-27 09:16:39,892 (DEBUG) ee : Running command: mysqladmin ping
2015-07-27 09:16:39,928 (DEBUG) ee : Setting apt_packages variable for Postfix
2015-07-27 09:16:42,523 (DEBUG) ee : Setting packages variable for WP-CLI
2015-07-27 09:16:42,524 (DEBUG) ee : Running command: which wp
2015-07-27 09:16:42,542 (INFO) ee : Running pre-update checks, please wait...
2015-07-27 09:16:42,543 (DEBUG) ee : checking NGINX configuration ...
2015-07-27 09:16:42,819 (INFO) ee : Setting up NGINX configuration 
2015-07-27 09:16:42,834 (DEBUG) ee : loading template file /usr/lib/ee/templates/virtualconf.mustache
2015-07-27 09:16:42,839 (DEBUG) ee : Checking generated nginx conf, please wait...
2015-07-27 09:16:42,913 (INFO) ee : [Done]
2015-07-27 09:16:42,914 (DEBUG) ee : Creating Symbolic link, Source:/etc/nginx/sites-available/test.com.ua, Dest:/etc/nginx/sites-enabled/test.com.ua                                                                                     
2015-07-27 09:16:42,922 (INFO) ee : Setting up webroot 
2015-07-27 09:16:42,922 (DEBUG) ee : Creating Symbolic link, Source:/var/log/nginx/test.com.ua.access.log, Dest:/var/www/test.com.ua/logs/access.log                                                                                      
2015-07-27 09:16:42,923 (DEBUG) ee : Creating Symbolic link, Source:/var/log/nginx/test.com.ua.error.log, Dest:/var/www/test.com.ua/logs/error.log                                                                                        
2015-07-27 09:16:42,923 (INFO) ee : [Done]
2015-07-27 09:16:43,059 (INFO) ee : Downloading Wordpress 
2015-07-27 09:16:43,060 (DEBUG) ee : Changing directory to /var/www/test.com.ua/htdocs/
2015-07-27 09:16:43,060 (DEBUG) ee : Running command: wp --allow-root core download
2015-07-27 09:16:44,930 (INFO) ee : [Done]
2015-07-27 09:16:44,931 (INFO) ee : Setting up database
2015-07-27 09:16:44,931 (DEBUG) ee : Creating database test_com_ua
2015-07-27 09:17:13,510 (DEBUG) ee : logging initialized for 'ee' using LoggingLogHandler
2015-07-27 09:17:13,941 (DEBUG) ee : ['/usr/local/bin/ee', 'site', 'delete', 'test.com.ua']
2015-07-27 09:17:13,941 (DEBUG) ee : collecting arguments/commands for <ee.cli.controllers.base.EEBaseController object at 0x7f75632a0cc0>
2015-07-27 09:17:13,947 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteController object at 0x7f75632af128>
2015-07-27 09:17:13,952 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteDeleteController object at 0x7f75632af898>
2015-07-27 09:17:13,957 (INFO) ee : Initializing EasyEngine Database
2015-07-27 09:17:20,520 (INFO) ee : Deleting Webroot, /var/www/test.com.ua
2015-07-27 09:17:20,520 (DEBUG) ee : Removing /var/www/test.com.ua
2015-07-27 09:17:20,520 (DEBUG) ee : Removing /var/www/test.com.ua
2015-07-27 09:17:20,650 (INFO) ee : Deleted webroot successfully
2015-07-27 09:17:53,610 (DEBUG) ee : logging initialized for 'ee' using LoggingLogHandler
2015-07-27 09:17:54,014 (DEBUG) ee : ['/usr/local/bin/ee', 'site', 'info', 'test.com.ua']
2015-07-27 09:17:54,015 (DEBUG) ee : collecting arguments/commands for <ee.cli.controllers.base.EEBaseController object at 0x7f4d48de0cc0>
2015-07-27 09:17:54,019 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteController object at 0x7f4d48de0eb8>
2015-07-27 09:17:54,025 (INFO) ee : Initializing EasyEngine Database
2015-07-27 09:17:54,039 (DEBUG) ee : loading template file /usr/lib/ee/templates/siteinfo.mustache
2015-07-27 09:18:09,152 (DEBUG) ee : logging initialized for 'ee' using LoggingLogHandler
2015-07-27 09:18:09,657 (DEBUG) ee : ['/usr/local/bin/ee', 'site', 'list']
2015-07-27 09:18:09,657 (DEBUG) ee : collecting arguments/commands for <ee.cli.controllers.base.EEBaseController object at 0x7f673a350cc0>
2015-07-27 09:18:09,661 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteController object at 0x7f673a35e080>
2015-07-27 09:18:09,664 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteListController object at 0x7f673a35e7f0>
2015-07-27 09:18:09,670 (INFO) ee : Initializing EasyEngine Database
2015-07-27 09:18:09,683 (INFO) ee : ***.com.ua
2015-07-27 09:18:09,684 (INFO) ee : ***.com.ua
2015-07-27 09:18:09,684 (INFO) ee : ***.org
2015-07-27 09:18:09,684 (INFO) ee : ***.dp.ua
2015-07-27 09:18:09,684 (INFO) ee : test.com.ua
2015-07-27 09:18:22,933 (DEBUG) ee : logging initialized for 'ee' using LoggingLogHandler
2015-07-27 09:18:23,322 (DEBUG) ee : ['/usr/local/bin/ee', 'site', 'delete', 'test.com.ua']
2015-07-27 09:18:23,323 (DEBUG) ee : collecting arguments/commands for <ee.cli.controllers.base.EEBaseController object at 0x7fc0afa88cc0>
2015-07-27 09:18:23,326 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteController object at 0x7fc0afa97390>
2015-07-27 09:18:23,329 (DEBUG) ee : collecting arguments/commands for <ee.cli.plugins.site.EESiteDeleteController object at 0x7fc0afa97780>
2015-07-27 09:18:23,333 (INFO) ee : Initializing EasyEngine Database
2015-07-27 09:18:27,122 (INFO) ee : Deleting Database, None, user None
2015-07-27 09:18:27,124 (ERROR) ee : Error occured while deleting database
root@***:~#

#5

Credentials in /root/.my.cnf are correct. I installed stack, create and delete sites under root.


#6
cd /var/lib/ee
sqlite3 ee.db

sqlite> .databases
sqlite> .schema sites
sqlite> select * from sites;

5|test.com.ua|wp|wpfc|deleted|2015-07-27 07:17:20|1|0|ext4|mysql||||localhost|0|0

Should I delete row from ee.db?

For example with:

sqlite> DELETE FROM sites WHERE ID = 5;

or there is other way?


#7

So is there other places except ee.db where ee stores information about created sites?


#8

Hello @gleb

There is no other place where EE keep site info .

After deleting site fron ee.db please verify there is no site configuration on /etc/nginx/sites-available


#9