Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

remove a wordpress site on a multisite server #182

Open
diroots opened this issue Aug 17, 2017 · 4 comments
Open

remove a wordpress site on a multisite server #182

diroots opened this issue Aug 17, 2017 · 4 comments

Comments

@diroots
Copy link

diroots commented Aug 17, 2017

Hello there.

I followed this guide
https://github.com/carlalexander/debops-wordpress/wiki/How-to-configure-multiple-WordPress-sites-on-a-single-server
to manage multiple wordpress sites on a single server.

all wordpress sites on the server are defined through a dns wildcard pointing to the server's ip:

# inventory/hosts
 
 [debops_all_hosts]
 first.example.com
 second.example.com
 third.example.com
 ... 
 
 [wordpress]
 first.example.com
 second.example.com
 third.example.com
 ...

As many points are configured for a single wordpress site, i'd like to know how to correctly purge the server about any configuration for a site I want to remove / delete from the server (webroot folder, nginx vhosts configs, unix users, fw rules, databases, varnish config,.... )

@carlalexander
Copy link
Owner

This is a good request. I'll need to think about it a bit and I'll try to write up something!

@diroots
Copy link
Author

diroots commented Aug 29, 2017

Hi

As I can discover by parsing the roles, a complete configuration for a site consists in :

  • unix user accounts
  • database
  • fail2ban rules
  • webserver (nginx) config & vhost
  • php config and fpm pool definition
  • pki / ssl generation and configuration
  • redis configuration
  • varnish cache setup for the vhost
  • wordpress setup

am I complete with this listing ?

I have noticed that if I remove some sites from the inventory/hosts :

  • all the configuration seems to remains (which appears a normal behavior as I did not explicitely told debops to clean old config),
  • but all old sites cannot connect to their database anymore.

I believe thid kind of site deletion could be initiated with an argument like 'state=absent' in their inventory/host line, then we could initiate a global 'debops wordpress' run, or even narrow it with 'debops wordpress --limit DOMAINTOREMOVE'

@diroots
Copy link
Author

diroots commented Oct 5, 2017

@carlalexander hello. any news on this point? can you give some hints on how to cleanly remove some sites?

@carlalexander
Copy link
Owner

Yeah sorry @diroots. Been busy and I haven't had a chance to work on the project lately. The key things to remove are:

  • nginx vhost files in /etc/nginx/sites-enabled/{ wordpress__domain }}
  • database
  • pki realm in /etc/pki/realms/{ wordpress__domain }}
  • PHP files in /var/www/{ wordpress__domain }}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants