welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Issues when wordpress_path is "/" #157

Closed esad closed 8 years ago

esad commented 9 years ago

If wordpress install lives in a root directory on a remote server, Movefile looks something like this:

wordpress_path: "/"

However, this will cause all kinds of problems when the database dump is adapted, as all instances of slash are replaced with local wordpress path.

Perhaps we could detect root path as special case and skip replacement of remote paths?

alessandro-fazzi commented 9 years ago

Hello @esad !

I don't want to be rude at all, but if you really have an installation in the root of a VPS or bare metal server, the problem lives in your server setup! :)

Are you sure that is not just a relative path where you're jailed via FTP / SFTP jailing? If that's the case, you can and should retrive the absolute path as per this paragraph of the README: https://github.com/welaika/wordmove#ftp-support

esad commented 9 years ago

Hi @pioneerskies, it's not a VPS but shared hosting, where my user is chrooted to a virtual "/" directory. I know that a workaround would be to move wordpress install into a subdirectory, but the hoster is so crappy that it's not possible to serve the root of the website from a subdirector :( Is this really such an uncommon use-case?

alessandro-fazzi commented 9 years ago

Have you ever tried to var_dump(__FILE__)? It's not an impossible case, but usually you should be able to retrive the path. At least, AFAIK, most crappy hosting have an html dir, anyway :)

Let me know