Save or Move Your WordPress Website

Photo Source

A lot of people in the dividend investment community have a personal, independent website. Often, we find it challenging to do the maintenance. One of the issues is how to save our web site into our local computer if we want. Or, you might want to transfer your website to another hosting provider. After spending 2 days trying to figure it out, I feel it would be not a bad idea to write it down here for 2 purposes: (1) For my personal note in case I need that again in the future; (2) for those are also interested in doing the same, it is a reference.

There are different levels of doing it, and I will break down into two main, independent solutions. You can just do the Solution 1, which help you save the website and help you move to a new host. However, you can not view and edit your website in your local computer. In order to view your live web site locally, you need to look at the Solution 2.

Solution 1:

The most fundamental for WordPress you need to understand is that, WordPress website includes two main parts:

(1) Part 1 is the WordPress software, which typically you can download from your hosting provider within the cPanel, and you do NOT need to download from the WordPress website. If you want to save your website from your hosting server, you need to download all the files under the “Filer Manager –> public_html”.

(2) part 2 is the SQL file. WP saves a lot of key content in the MYSQL database, and you need to download it using the phpMyadmin within the cPanel. The following YouTube video provides an excellent demonstration, and I will not go into details how to do it.

Solution 2:

While the Solution 1 can satisfy most of your need, you might want to view and edit your website locally. There are a few other steps that you need to take in order to achieve that.

Step 1: Download XAMPP.

Step 2: Download your established website from your hosting server. You can instead just download a brandnew WP files from WP website as well.

The following video shows you how to do the first two steps:

Step 3: change parameter in the SQL within your local myPHPadmin:

UPDATE wpvu_posts SET guid = REPLACE(guid, 'dividendscience.com', 'localhost/ds_working') WHERE guid LIKE 'https://dividendscience.com/%'

UPDATE wpvu_options SET option_value = REPLACE(option_value, 'dividendscience.com', 'localhost/ds_working') WHERE option_value LIKE 'https://dividendscience.com/%'

UPDATE wpvu_posts SET post_content = REPLACE(post_content, 'dividendscience.com', 'localhost/ds_working') WHERE post_content LIKE 'https://dividendscience.com/%'

UPDATE wpvu_postmeta SET meta_value = REPLACE(meta_value, 'dividendscience.com', 'localhost/ds_working') WHERE meta_value LIKE 'https://dividendscience.com/%'

Note on these SQL queries:

(1) It seems that the first query might not be necessary, namely the one on “guid.”

(2) Please manually check the option_value, on the columns of “home” and “siteurl”. See this post for more information.

(3) Some SQL database may use “wp_post” instead of “wpvu_post.” Thus, check with your SQL database.

Step 4:

While it is not mentioned in all the posts I can find online, it happened to me. That is, I found that when I clicked buttons to read posts or pages, it went back to the XAMPP welcome page. Then, I found that I need to manually enter a value for “_menu_item_url” within the “postmeta.” It was empty there, there was no the full domain “dividendscience.com” there.

That is, you need to insert the the following. Replace “ds_working” with your own website name locally.

http://localhost/ds_working/

Leave a Reply

Your email address will not be published.