Giving a domain to a user

wordpress

#1

I’ve given a site of mine over to a friend, and I’m trying to figure out ho to give him FTP acess to that domain, but not the rest of the domains in m account. I read this article on the wiki about giving a single domain to a single user:

http://wiki.dreamhost.com/index.php/I_dont_want_to_give_a_user_access_to_all_of_my_domains
But… I’m wondering what will happen if I do this with a site that’s hosting a WP install. Will it break the blog? He’s already posted a few things on the blog, and I don’t want to switch it over until I know I’m not going to destroy his data.

It’s my fault Black Leaf died!


#2

It shouldn’t break the blog, as the database, host, db user, and password (the values of which are stored in the wordpress “config” file) will not need to change for the system to continue to work. You will still “own” the database, and it will be accessed as your user, but it will it still work.

However, I don’t know enough about how the Dreamhost “one click” system will react to it (I don’t know exactly how the panel “tracks” those installs), so you might find that it will no longer be able to be updated via the “one-click” section of the panel after the “user” change.

I don’t see that as being all that critical, because “he” can still update “manually” using the instructions from WordPress at any time, and it is not really that difficult. Installing and upgrading WordPress “manually” is not that hard to do, and if you are not tied to using the “one-click” system, none of that earlier discussion applies.

One thing that could happen when you re-assign the user who controls the site and WordPress directory (and those beneath it in the directory tree!), is that WordPress files may retain the ownership of the user that created them. If you make this user change via the panel, I’m not exactly sure whether or not this will happen (again, I don’t know, in terms of *nix permissions, what the DH panel actually does when it reassigns the user). It may “automagically” reassign ownership of the files/directories to the new user, in which case all should be fine. OTOH, it may not, which would leave that user with stuff in “their” directory that they do not own, and that could cause problems wihen executing WordPress. I wish I knew for certain exactly how this would work, but I don’t :frowning: .

An easy way to “hedge your bet”, so that you are “safe” either way, would be to simply download all the WordPress files, sub-directories, and such (don’t forget the .htaccess file!) to your computer via ftp before the change, so that you can “re-upload” them via ftp as the new user, if the installation “breaks” due to permissions.

As is always the case, I recommend you back-up everything anyway, because things could “go South” at any time - There are instructions in the wiki on backing up the a MySQL database, and you might want to do that to leave yourself a third option.

That option would be to just delete the existing WordPress installation via the “one-click” system before changing the user (while the database should still remain, you should back it up anyway), and use the “account privileges” information from the wiki to grant the new user access to “one-click installs”, database, access as desired. Then, after the new “user” and their privileges have taken effect, he could log-in to the panel, create his own “one-click” installation of WordPress. Once this is done and working properly, you could “export” the relevant data representing his content from your existing database , using phpMyAdmin or other method, and then “load” it into the new database he created with his “one-click” install.

While this seems unnecessarily complicated, and it can be a bit “tricky”, you might find it desirable to go this route as it will leave the new user in complete control of his WordPress database, and keep anything else you may have stored in that database available only to you. I just presented an “overview” of that process, but there is a great deal of additional and detailed information available in this WordPress Codex article on “Moving WordPress”, as well as other articles in the WordPress Codex and the WordPress Support Forum. Actually, I strongly recommend you at least review that “Moving WordPress” article as you will gain a lot of understanding about what is involved and it may help you decide how to proceed. Good Luck!

–rlparker