Note:
Some new clients may have a WordPress site that they wish to import the contents of into their Real Geeks site. This can be done, but the client must provide us with the export file from WordPress:
https://en.support.wordpress.com/export/
Note:ONLYposts, pages, comments, categories, and tagsmanually
Once you have the file and know the website that the file should be imported into, you will need to rgssh
into rg2-staging
from your terminal:
After logging in successfully, run the following to go to the root environment:
Then run the following:
You will want to copy the CONTAINER ID associated to the "bash -c 'mkdir -p..." COMMAND (e.g. 307b34a126ab)
Note:Once you have copied the CONTAINER ID, run the following:
<CONTAINER_ID>In which <CONTAINER_ID> is the ID you copied.
TRANSFERRING FILE:
Before you can import the WordPress export file, we need some way of sending the file to the server from your computer. This would be done via magic-wormhole:
https://github.com/warner/magic-wormhole
So this will need to be installed on both your computer and within the rg2-staging that you logged into from above.
You can run the following to install magic-wormhole:
https://magic-wormhole.readthedocs.io/en/latest/welcome.html#installation
IMPORTING WORDPRESS EXPORT FILE:
In another tab/window within your terminal, open the folder containing the export file and run the following:
in which <FILE_NAME> is the name of the file including the file extension (e.g. totallynotrealgeeks.wordpress.media.2018-05-21.xml).
You will receive a Wormhole code for the file. This will be used to receive the file within rg2-staging.
Copy this code (e.g. 1-almighty-accrue) and go back to the tab/window that you used to rgssh into rg2-staging.
Now run the following:
in which <WORMHOLE_CODE> is the code you copied.
Once you have successfully sent that file over to rg2-staging, run the following to import the file to the desired Real Geeks website:
in which <WEBSITE> is the client's website (e.g. www.totallynotrealgeeks.com) and <IMPORT_FILE_NAME> is the name of the file you received including the file extension (e.g. totallynotrealgeeks.wordpress.media.2018-05-21.xml).
After importing the file, navigate to the client's site backend and go to **Redirects**. From there, remove the "/" redirect that was created by our import tool.
All done! :)
TROUBLESHOOTING:
If you encounter any issues importing a file (e.g. error messages), there may be a special character within the .xml file that needs to be deleted.
For example, you may need to remove CTRL-M characters: https://its.ucsc.edu/unix-timeshare/tutorials/clean-ctrl-m.html