sandshakimi
asked on
Best Practice to Export and Import Drupal Website?
I developed a Drupal 7 site on my local machine and want to share that with another party who has an equal WAMP stack Drupal environment.
So what's the best way for me to export my site and zip it over to them?
So what's the best way for me to export my site and zip it over to them?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can with PhpMyAdmin but best to do it with mysqldump as follows
mysqldump
To restore you can use PhpMyAdmin as well or you can do it on the command line by logging in to MySQL and using source
But then you need to make sure that dumpfilename.sql has a USE database statement for the target database if it exists already otherwise a create database and use database if it does not.
PhPmyAdmin - will depend on your server setup (hosted) as to what functions are available.
You can also look at tools like SQLYog which if you have direct access to the database is far superior to PHPMyAdmin.
mysqldump
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
To restore you can use PhpMyAdmin as well or you can do it on the command line by logging in to MySQL and using source
mysql -u root -p[root_password] [database_name]
use DATABASENAME;
source dumpfilename.sql
You can do it in one command like somysql -u root -p[root_password] [database_name] < dumpfilename.sql
But then you need to make sure that dumpfilename.sql has a USE database statement for the target database if it exists already otherwise a create database and use database if it does not.
PhPmyAdmin - will depend on your server setup (hosted) as to what functions are available.
You can also look at tools like SQLYog which if you have direct access to the database is far superior to PHPMyAdmin.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can I do this via phpMyAdmin. I have more experience with GUI than using MySQL command line.
But I can do whichever is best practice. With command line, I need specific steps.
Thanks