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.

Our God is too small.

I see many people “losing their faith” because the god of their childhood is eclipsed but their growing knowledge and understanding and their faith crumbles like a sandcastle before the incoming tide.

There is of course a big problem if your god is merely a sandcastle of experiences from your childhood, when in reality He is the creator of the tide.

At whatever time in your life, when you first profess a faith in God, why would you ever consideration that that declaration would be static?

I think we give god a name, we give him a compartment in our lives, and we tick that box off our list. God does not want a name, a cubbyhole or our autograph. It is simplistic to say he wants us, yet he does, as a disciple, as a follower, in an ever-expanding relationship of information, knowledge, understanding and wisdom.

Look at it this way.
We may have a lot of information entering our lives. Not all of it true real or useful. So rather than being a sandcastle against a tide, be the tide, be the beach, be the ocean.

If we do not bring new information into our lives, good or bad, useful or useless, obvious or vague, then our faith will become stagnant, this can lead to one’s faith atrophying.
As we acquire information, we will order it, knowingly or unknowingly, the information will become knowledge, and from that knowledge, we will continue to build our lives, build our faith. We are meant to examine this information and this knowledge, to refine it, test it, see if it holds up to the light of day, can stand the test of time, for it to become understanding. We will discard some information and reinforce other areas of information. As we practice our understanding of our knowledge from the information we have, so we build wisdom into our lives. Wisdom is the ability to tackle the contradicting buckets of information we receive, the differing understandings we glean from these processes and create a cohesive faith from realising we can hold two competing views simultaneously. Uniformity is not the goal of faith. God is so much bigger than this.

We do not need to be afraid of the information surrounding us. We do not need to stand in front of this wave of information as if we need to protect our sandcastle of God. That He is fragile and information and rationality might make Him go, poof. Rather stand next to the Creator of the Universe and let the two of you process information so that you gain knowledge, and from this knowledge understanding, so wisdom can flourish, and you can thrive.

How big is your God?

Is God Sovereign?

Is God Sovereign?
Is God in Control?
Does God know?

If you think these things are true, it does not remove the possibility that you will die a violent death.
Be it a car accident, a fall, a mugging, or a murder.

A quote I saw recently: I would rather take a very small risk of dying while FULL living my life, than risk nothing and live like I am already dead.

Our western society is obsessed with safety, of staying alive. Go to a hardware store and you will see the most ridiculous safety stickers on the most benign of things. Yet we are more obese than ever, intake insane abouts of sugar daily, super size everything and beginning to have a lower expected life span than the previous generation. It would seem as we live, we are no longer alive.

  • However, life is dangerous.
  • And our lives need to be lived.
  • And to avoid all dangers is to never live.
  • Try to mitigate dangers too much and you begin to mitigate living.
  • To be foolish is more dangerous than many dangers.
  • Today, if a young person dies, we now hold someone alive to blame. Now someone may be to blame, yet a young person, a young adult is responsible for their own lives.

Older adults think with the prefrontal cortex, the brain’s rational part. This is the part of the brain that responds to situations with good judgment and an awareness of long-term consequences. However, it often takes living experiences, from our amygdala, the emotional part of the brain, before we learn the values of the prefrontal cortex, and start living from that.
It is a sad truth that many learn to live from their prefrontal cortex as a result of watching others live from their amygdala, as they held their friend’s beer.

So even if the decision making part of their brain is not fully developed, we can not hold others responsible for our poor decision making, and object lessons of peers dying are far more powerful than any safety video.

Young people die from foolishness and folly and faithfulness. Older people do too.

This has been true for ever.
It is amazing that I am alive, since my grandfather, at the age of 20 was left for dead twice. He was in Gallipoli (WWI) and the first part of what happened was foolishness on his part. Putting his head above the parapet and saying, “Where are the Turks?” He got shot in the head. Being examined, and considered too critical he was put on the dead pile. His friend, last name of Wagg, saw that he was still alive, took them off the pile and back into the field hospital.
This I believe, happened twice.
Ernie was stabilized, transferred to the hospital ship, did a full recovery. He returned to New Zealand, married, ran a sheep farm for some 40 years, and had five children. Having retired, he lived to about 85. All that time carrying a bullet in his head.

A young person may seem to die from foolishness from our perspective, but from Gods it was faithfulness. Or we may see faithfulness in a person’s death, while God sees folly.

Who wants to have a conversation around God’s sovereignty, control and foreknowledge?

Did God know Judas was going to betray Jesus as an act of sovereign will or foreknowledge?


Becoming the monster that the monster is afraid of.

We all have snakes in our lives.
Snakes in our garden.
The snake is not the problem.
The snake is a lie and a falsehood, no matter how physical it also is.
The problem is the power it has stolen from us and the power we have given it. The lies it has spread and the lies we accept a true.

The snake is a monster under the bed, hiding in the wardrobe. You don’t win over the snake by hiding from it, ignoring it, trying to appease it.

You win over the snake by making it afraid of you.
How ever much of a monster the snake is, you, with Father God behind you, makes you a far greater monster. Not a monster of darkness or lies, but a monster of unbearable light, of unbearable truth. If power is the hallmark of a monster, then God is the greatest monster of all. A monster of love, kindness, tenderness. A gentleness so powerful that nothing can stand before it, and you are way up on His shoulders.

From this position you swing a mightly sword to cut off the snake head.

And now you can help other to also become this monster to their snake.

Hacking 101

Blank Website

Been hacked and the affected website will not even load, you are just presented with a blank page.

  • Check that index.php exists.
  • Check that inded.php only has the very small amount of standard lines that come with WordPress.
  • Check that index.php is not 0 bytes long.

Website exists

Go in to the Dashboard and install WordFence, the free version is going to be good enough to get you started.

Run WordFence and only if you know what you are doing start making the changes WordFece suggests.



I have found bad index.php files in a number of locations, such as ./cgi-bin/index.php

WordPress Hacked

One of my customers just got hacked.

The hack was not very good, as it did not give the hackers control, unfortunately, it did kill the website.

It would appear that this site was hacked three-time, with each hack not getting fully birthed. Then on the 31st, when a whole lot of updates got done, the degree of access increased, these hacks then went active last night and killed the site.

  • To fix this I copied the affective files to a hidden sub-directory.
    • To have a look at later.
  • Copies over clean version of the affected files from a good site.
  • Gave these files ownership back to the site.
  • And the site is up and running again.
  1. Since then I have installed the free version of WordFence on this site.
  2. They have their /wp-admin page hidden.
  3. All plugins have been updated.
  4. We need to get rid of any plugins they do not use.

The hack was a redirect hack, seeking to cause people coming to this site to then be redirected to another site somewhere else in the world.

Send an Email when you have a new Post

I have been looking for a reliable way to send an mail to people that have signed up to receive notifications of a new Post.

I started using MailPoet for one person and I am now using this myself.

Install the plugin.

Once you have the plugin installed, let’s set it up.
Go to Subscriptions, and Add New and put yourself in, this is what we will be using to test that emails are working.
Go to Lists, and create a new List. And put your self in that List.
Go to Settings, setup Default sender. Contact us if you need help.
Go to Emails, and set up a Post Notifications.

Post Notification.

You need to create a Notification Email. This will be sent to a particulate list when you create a new Post.

When you go to Post Notification, start setup and use Immediately.
Click Next.

Choose a look and feel.


Having set up MailPoet I still could not send emails. Digging a bit further I have this issue with my settings.

I had a Key in there already.
Clicking on Activate MailPoet Sending Service, fixed my issue.

Let’s Test.

Some things to secure your website.

That does not cost anything.

Update WordPress

Anytime you login to your site and you see this.
Click ‘Please update now”!
Also, update all your Plugins and Themes.

WordPress Login

Every so often my server gets hammered with thousands of attempts to login with bogus credentials.
If you do not have the plugin “Limit Logins’, then every attempt is sent to the server backed, and of course rejected because either the username is incorrect or the password is. But still, this is processing power wasted.

The first thing we do is install this plugin.

Limit bad logins

This is standard on all new WordPress installs.
If you do not have it, get it.

You know your Login page, username and password.
If some tries and fails four times they are locked out for twenty minutes.
If after that they try again with four fails they are locked out for 24 hours.

Make your Site https

Really Simple SSL automatically detects your settings and configures your website to run over https.
To keep it lightweight, the options are kept to a minimum. The entire site will move to SSL.

Install and Activate

You will be taken to a screen to ‘Go ahead, activate SSL!”
On the next page click “Enable” on the line for 301 redirect

Hide your Login Page

Change wp-login.php to anything you want.

Install and Activate, click on the plugins Settings link.

One the next page , change the word “login” to some thing you can remember but is unrelated to WordPress or logging in. Say, “mywriting”.

Logout and login using this name and now wp-admin.


We will just be using the free portions of this plugin.

Make sure you have also used WPS Hide Login.

Install and Activate, on the next screen put in your email address so you will receive warnings when hacking attempts happen.

At this time we do not have a Premium Key, click No Thanks.


I’ve been looking for a server solution, and I think I just found one.

On the Linux Server I run

sudo curl | sudo bash

Enter my password so this can be installed as root.

August 2020, had this issue:

Peer reports incompatible or unsupported protocol version.
yum update -y nss curl libcurl

Now I ran

rclone config

There was a lot to work through so this is what I did and what I wanted.

  • I have an unlimited account.
  • I created a Team Drive to receive these backups.
  • I configured my own certificates to create a secure connection between this server and my Google Drive Team Folder.
  • In my user fold on the server I created a Directory called googledrive.
  • I then ran this command to connect my defined Google Drive Team Folder in the cloud with my user folder of googledrive.
rclone config show
rclone mount theconfigname: /home/auser/googledrive/ &
the & completes and returns
theconfigname: 1099511627776 0 1099511627776 0% /home/auser/googledrive

Now that is a lot of available storage.
But then from this server I am backing up over 1T of data. And how to do that?


I seem to be able to get rclone operating flawlessly when I am backing up to a Google Team Drive. But to My Drive is still causing me a lot of issues.

Mounting Issues

I had an issue with mounting a Google Drive, it was fixed by doing the following after the error below.

rclone mount source /root/destination
2020/07/28 13:11:27 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH
yum install sshfs

Bad Unmount

??????????? ? ? ? ? ? googledrive
umount -i /root/googledrive