开发者

What is the best development environment for Drupal to be able to move it to a different server at go live?

When i've worked on Drupal sites before, if there is internal access to the server, or if remote desktop access is available, i've always developed it on the machine it would be ran from when live, and just not made it public on the server.

However, 开发者_运维百科what is the best thing to do if you don't have access to the server yet, for example if the client hasn't got anything in place?

I need to be able to build and test the solution on my local machine, or on my VPS which I have RDP access to, and be able to move it over with as much ease as possible to the clients server when ready.

Any tips or best practices? As far as i'm aware Drupal doesn't have any specific migration tools? I could be wrong though


I don't work with Drupal, but for Prestashop, Wordpress, Zencart, etc. I always use the same workflow:

  • I setup a vhost in my virtual sever, usually using a subdomain of my own domain (like customer.mydomain.com). Install the software with its DB etc. on the server. Setup FTP access.
  • I get a local copy of the files, which I maintain in a local git repository, pushing to github for backup purposes mainly.
  • I work with ZendStudio and configure a remote server and set it up to upload the files when I save them, so I can check them pretty much as if I were working locally. But the main advantage of this approach is that I can share the project with the customer as it progresses.
  • When I have to move to final server, at least with Wordpress, I have to search/replace the domain name, which wordpress saves on DB. But I do it locally. I download the entire DB as an SQL file through phpmyadmin, open it, searc-replace and upload it again via phpmyadmin to the permanent server.
  • With ZenCart and others the problem is the config file, which stores some paths. For long projects or long term customers I modify the config file to use some config details or anothers depending on the server name.


adding to the above comment...

Check the "backup and migrate" module and the "backup files" module. "Backup and migrate" is useful in any setup...

with this I was able to do a barebones drupal install and then migrate/replace the database with the one backed up from my local system... if the databases are named differently you will still need to edit the settings.php

"backup files" is useful for themes and content assets like images etc. but is essentially just a wrapper around gzip


I typically develop on my local machine and then upload to server once complete.

All you need to do is change the folder name in /sites/ and change the settings.php file to reflect the server settings/domain.

Something you should be aware of:

  • If you are uploading files on your local installation, the file paths will be wrong on the server and you will need to execute a one off mysql replace query.
  • Make sure you use relative paths in any hard coded links.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜