|
|
|
# How to copy your website manually:
|
|
|
|
Inspired on the tutorial [here](https://www.bluehost.com/blog/wordpress/faq-how-do-i-move-my-wordpress-website-to-bluehost-1787/?utm_source=google&utm_medium=genericsearch&kclickid=0f60fdc4-0ff4-417d-bf71-38669c3dfc1e&kenshoo_ida=Blue%20Host%20IDA&gclid=Cj0KCQjws_r0BRCwARIsAMxfDRizC-ttRntH15H22Qv77fJcGnRnJFWIjPbYCDjplbCuk0TbFpgWQ9oaAnWQEALw_wcB):
|
|
|
|
|
|
|
|
1) To start, log into phpMyAdmin to export your site’s database. All gen-europe Wordpress websites have phpMyAdmin access e.g. https://phpmyadmin.gen-europe.org/
|
|
|
|
2) download and save your wp-content folder by [copying files from the corresponding docker container](copy-files-from-docker)
|
|
|
|
3) Install WordPress on the target machine if it hasn't been done
|
|
|
|
4) Overwrite the existing wp-content folder with the one you downloaded from your previous host
|
|
|
|
5) Open phpMyAdmin on the target host (you might need to install phpMyAdmin if using a LAMP/WAMP stack)
|
|
|
|
6) Select the database to which you want to import your data. You may need to look up this information. (To do so, go to the File Manager in your control panel and open your public_html folder. Then scroll down to find the wp-config file, right click the icon, select “Code Edit”, and then “Edit.” In the code edit window, scroll down to identify the database you should use
|
|
|
|
7) Back in your phpMyAdmin window, once you’ve selected the correct database, you will see a list of tables. Drop these tables before you import your new data by selecting the “Check All” option at the bottom of the list and then selecting “Drop.”
|
|
|
|
8) Now it’s time to import! Go to the “Import” tab in phpMyAdmin. Choose “Browse your computer” and find the SQL database file that you exported from your previous site. (It should be named something similar to “bluepm1_wor2.sql”.) Make sure the SQL format is selected and click “Go.”
|
|
|
|
9) Here is an important step after you import your database. After your database is imported, check to learn the new table names. If your table names begin with ‘wp_’ then you don’t need to make any changes. However, sometimes your tables will import with a name like ‘wrp-‘ Go to your file manager and open the wp-config file in your public_html folder.
|
|
|
|
10) Right click on wp-config, select “Code Edit”, and then select “Edit.”
|
|
|
|
11) Scroll down until you find the line “$table Prefix” line. Edit it to read ‘wp_’.
|
|
|
|
12) Change the Database entries if needed:
|
|
|
|
```
|
|
|
|
UPDATE wp_options SET option_value = replace(option_value, 'https://wpdev.gen-europe.org', 'http://wpdev.localhost') WHERE option_name = 'home' OR option_name = 'siteurl';
|
|
|
|
UPDATE wp_posts SET post_content = replace(post_content, 'https://wpdev.gen-europe.org', 'http://wpdev.localhost');
|
|
|
|
UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://wpdev.gen-europe.org', 'http://wpdev.localhost');
|
|
|
|
|
|
|
|
UPDATE wp_options SET option_value = replace(option_value, 'https://wpdev.gen-europe.org', 'https://gen-europe.org') WHERE option_name = 'home' OR option_name = 'siteurl';
|
|
|
|
UPDATE wp_posts SET post_content = replace(post_content, 'https://wpdev.gen-europe.org', 'https://gen-europe.org');
|
|
|
|
UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://wpdev.gen-europe.org', 'https://gen-europe.org');
|
|
|
|
```
|
|
|
|
13) open wp_config.php and change DB name, user, password and host to whatever you are using in the target machine
|
|
|
|
* e.g. root to wpuser, DB_HOST to localhost, DB_NAME to geneu
|
|
|
|
|
|
|
|
## Alternative way of creating a Database dump:
|
|
|
|
* enter into mysql docker container for the website you want to create a DB dump of
|
|
|
|
* ``mysqldump -u root -p wordpress > 2020.04.28_wpdevdump_mysql.sql``
|
|
|
|
* ``docker cp yggdrasil_mysqlwp_1:2020.04.28_wpdevdump_mysql.sql ~/wp-backups/wpdev/2020.04.28_wpdevdump_mysql.sql``
|
|
|
|
* ``docker cp ~/wp-backups/wpdev/2020.04.28_wpdevdump_mysql.sql mysqlwpnewgeneuwp:2020.04.28_wpdevdump_mysql.sql``
|
|
|
|
* ``mysql -u root -p wordpressnewgeneuwp < 2020.04.28_wpdevdump_mysql.sql``
|
|
|
|
|
|
|
|
## Other tutorials:
|
|
|
|
Migrate wp to localhost:
|
|
|
|
https://www.bluehost.com/blog/wordpress/faq-how-do-i-move-my-wordpress-website-to-bluehost-1787/?utm_source=google&utm_medium=genericsearch&kclickid=0f60fdc4-0ff4-417d-bf71-38669c3dfc1e&kenshoo_ida=Blue%20Host%20IDA&gclid=Cj0KCQjws_r0BRCwARIsAMxfDRizC-ttRntH15H22Qv77fJcGnRnJFWIjPbYCDjplbCuk0TbFpgWQ9oaAnWQEALw_wcB
|
|
|
|
|
|
|
|
https://www.5balloons.info/migrate-setup-live-wordpress-site-localhost/ |