Moving a WordPress

The scenario is that you have a fully functional WordPress, somewhere, and it is a different name, and you want to transfer it.
An example of one I have done was a new site being build as and it is going to replace
I have even done this between servers, and on the same server.

Step 1

  1. Update all plugins.
  2. Update all themes.
  3. Update WordPress.
  4. Make a backup.
  5. Better still, if you have access to the CLI, make a mysqldump of the database (see below) and a zip of the documnet root.
  6. If the transfere is between servers, download both files to your local computer.

Step 1.1

Making a MySQLdump.

mysqldump -umysite_wp2 mysite_wp2  -p'S.2TgD7jpNLtAvhgWLE49' > 05092021.sql

You find the user, site db, and password in wp-config.php

Step 2 Find & Replace

I use emacs on a Linux machine to do the find and replace.
The find and replace command is ctrl-shift-alt-%

We need to find and replace

  • and replace it with
    • This makes sure all redirects are corrct to the new url
  • /home/user/ and replace it with /home/user/public_html
    • This makes sure the document root is correct.
  • and replace it with
    • This makes sure any email addresses have been changes to the correct domain name
  • Search on, and see what you find you may have to do
    • and replace it with

Step 3 Move directories

  • Up load the SQL file and the ZIP file to your new staging area.
  • I move the existing public_html to old.public_html.
  • Unzip the zip file to a hold directory.
  • Create a new public_html with the correct ownership and permissions
drwxr-x---.  7 myname nobody      4096 Sep  6 07:02 public_html
  • Copy wp-config.php from old.public_html to public_html replacing the one from the old staging site
  • Copy the files from the Zip Hold area to public_html
  • Make sure they have the right ownership, myname.myname, and permissions.

Step 4 import the SQL archive.

Using the correct settings from the wp-config.php file run:

mysql -umysite_wp2 mysite_wp2  -p'S.2TgD7jpNLtAvhgWLE49' < 05092021.sql

This is the reverse of what we did above.
There should be no errors and the command line should just drop down one line.

Step 5 plugins

Plugins should just work.

However, I have found one issue with Wordfence. There is a setting that want to point back to the old site.

; Wordfence WAF
auto_prepend_file = '/home/oldsite/'
; END Wordfence WAF

And change it to where the new document root is.

; Wordfence WAF
auto_prepend_file = '/home/mysite/public_html/wordfence-waf.php'
; END Wordfence WAF

And everything now works.


Today’s YouTube browsing took me to:

Precious Plastic

Previous Plastics :

Then a shredding video here:

What interests me here is the combination between Maker & Creator, not just making stuff, but coming back a step or two and creating the stuff you use to make the stuff.

Also the Open Source nature of this machine and the manufacture support, which included a list of people all over the world who have taken Precious Plastic Open Source designs and made the machines available in their country.

It’s been a good week

20160807_06292820160807_063207My green card arrived this last week! What a two year journey. I am thinking that I want to write what it took to get where we are today, but at the moment the last six weeks have been full of getting used to living in Hawaii, working at the University of the Nations here, working on the FARM that is, and seeing how the business will roll with me not being in New Zealand.

The farm is made up of several different areas and Christine and I are focusing on the Aquaponics.

Yep that is a long drop in the picture below, more of a teaching aid, but it is functional. We get a lot of 18-28 year olds through that re experiencing many things for the first time.

Come back to see more.











What is creating the chasm in your marriage?

You’re not the person I married.
We just drifted apart.
We got bored with each other.
Our marriage was a farce.
If we want to live like we do then I need to work like I do.
They were more married to their job.
I just had to prove myself.

I have often seen churches, missions, jobs, sports, entertainment and the placing of ‘that thing’ above marriage. Always with great sense of duty, vocation, even service. I don’t know if it is because it is easier to serve and be dutiful to the thing than the person they married. Maybe it is a slow slipping, just the way things happen, a first world problem.

At times I have been outspoken against certain activities because of the rotten fruit it produces in some people’s marriages. But really, there is no one thing or groups of things that can be eliminated and your marriage will be sweet. It is as if the weather of this world is constantly howling against our marriages, trying to find a way to get it’s cold tentacles into our hearts and freeze them. You shore up one area, and another gets attacked.

The issue at point is, what are the chasm creators in your marriage?frozehouse
What have you allowed to slowly bring separation?
What is the elephant in the room?
What topic is always left unspoken?

From an untidy, lazy habit, to a full blown obsession.
The telling question that can only ever be asked, never forced on the other, is.

What things am I doing that are creating a chasms between us?

Every one of us has things that the other person is doing that grate. I am not talking about answering this question to change traits in the other to just make ourselves comfortable. Rather I am thinking of those things, those actions, were one spend oneselves, that is eloquently justify, that are creating chasms. Things that even while doing a lot of good are a winters cold slowly penetrating, allowing the beginning statements to come into existence.

It only takes one to create a chasm, it takes two to close it.

What does being uncomfortable look like.

It’s not about having boils on our bum, sores on your face. It’s not about flagilation.

It is about holding the contradictions of our faith without going to one extreme or the other. No not those contradictions…

Rather the ones about serving a sovereign God as beings of free will.

That the great must be servants.

Or to gain our lives we must give them up.

We are called to stand firm, yet he who thinks he stands take heed least he fall.

The last shall be first, but if we make ourselves last so as to be first, do we already have what we should get.

A bigger contradiction is prayer. Prayer is not a shopping list for our desires, but a surrendering of our wills to God’s desires.

The sweat of our determination does not change God’s will to our agenda, our fasting, intercession, duration of praise and worship, does not finally pester God into action. Rather these things are meant to break us down then build us up into His likenesses, to render us by renewal, that is the removal of the old to the planting of the new, into His same attitude, so that we are transmuted in to the place where His will already is.

All these things are uncomfortable to us, for individually we know where we need to change, what ain’t right, not matter how well we hide it. Surrender does not come easily for this body of flesh.

Interview on Radio NZ

This was on last Saturday morning on Kim Hill’s ‘Saturday Morning’.

British mathematician and philosopher of science, who is Professor of Mathematics at the University of Oxford, and has written a number of books about god and science.

If you can not listen from the embeded link, listen here, or download here.