WordPress site- relocating links on another site

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

I have a couple of demonstration sites.  Vast & Property Information.

These are sites that I use to demonstrate certain functions of a programme or to display results.

Early on I started with a Google Map that I applied data over. For some reason, it is a bit sensitive on my VPS site and doesn’t work.

As I wanted that information running straight away I just used my AwardSpace site to have this information on and put a link from my VPS hosted site (as I didn’t want to spend time debugging the issue relating to the VPS at that time).

My awardspace account is expiring early next year and I need to migrate data across from it to a new site. I am looking for another free hosting alternative.

AwardSpace is a great service for the first year, then the sites become a bit expensive. I would have gone to them for my VPS but they only do Linux, not Windows, and I wanted to ease my way into the VPS area by staying with windows server (more expensive) but familiar. I have had a few accounts with them but I think they want me to pay going forward. Fair enough from their perspective.

I looked up free hosting and found this article, and decided to give infinity free a try.  Sol I’m going to use FileZilla to transfer my site information across from one site to the other. Once I have the information on the new site I’ll need to re-establish the links from the AwardSpace URL to the Infinity URL on the websites I have on my VPS.

An aside about website maintenance

Maintenance is a constant challenge, whether to keep your data updated and how much time you wish to spend maintaining the systems and processes.

I am interested in exploring information, and create demonstration processes to reflect these ideas. I need the example up and running so people can visit the site and see it running, and I also have a record of my process too.

I’m exploring data and I want to extend myself and try new things. If someone would like to pay me to do these processes for them I’m happy to keep the data updated.

I’ve already done the exercise, know its feasible, now onto another idea and challenge. I do not want to spend a lot of time doing maintenance.

This is why I like WordPress, its free, there are lots of plugins and the sites are generally easy to manage.

I have done a couple of non-WordPress sites and they took a long time to set up (good learning). Also, if things changed (linked to other code) you had to go and identify the breaks and fix them. Time-consuming. I was interested in content, not the site maintenance (which, like a lot of other things can take a lot of time).

The particular web map with condition works with a .geojson file and JavaScript calls. I would change it to a database and JavaScript in the future if someone was interested in the programme,  so I’m not, at this point in time, interested in updating it.

But for the present, I need this example running on a site somewhere.

Moving files between servers using FTP

The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and server on a computer network.

Filezilla is a free programme that does this. I find, if you get the parameters set up for a new site its brilliant, if you don’t get the parameters set up right it’s just massively frustrating. Once you have the protocol (HostName, IUserName, Password, Port) setup and stored it merrily works thereafter and is great for doing big uploads across server sites to/from PC. 

In this case, I have only figured out how to copy from one server to my PC, so I’ll copy from AwardSpace site to my PC, then transfer to Infinity site.

A lot of free hosting sites also offer a free domain. At awardspace, it has an extension .dx.am, at infinity its .rf.gd ( I thought the award space one was cool. I got a site name ekar.dx.am, backward that’s ma.xd.rake). I have kept the domain as asta0 in the new case, so the new one is asta0.rf.gd. I have just checked it and it works (sometimes takes a couple of days to propagate the domain name, this works after 1 day).

So, once you have Filezilla setup, copy files from AwardSpace server to PC then from PC to InfinityFree.net

Check files work with new URL (A Uniform Resource Locator, colloquially termed a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it.) Once tested to see that new URL works, eg old URL:

http://astra0.dx.am/w/data/MapOfCondition/index.html

New URL

http://astra0.rf.gd/w/data/MapOfCondition/index.html

(an aside, this does not work(sometimes) on my main PC in Firefox, but does work on my tablet in Firefox. On the main PC works fine in Chrome).

Updating WordPress Links in Databases.

Here is the supposed WordPress way of updating links, personally I have never had success this way on my VPS I am running MySQLWorkbench (not PHP Admin) that does nothing with the Update command. SQL command below:

UPDATE wp_posts SET post_content = REPLACE (  post_content,  'text to find here',  'text to replace here');

Find and replace text across a whole WordPress web site using phpMyAdmin

On web hosting sites that have PHP Admin running I think the search and replace with the method above works fine as far as I can recollect.

But for MySQLWorkbench see this discussion. This process works for me.

The method of Dumping the Database to a Text File, use Notepad++ to find & replace and then reload the database. After editing SAVE and then import the data via the import command under Server tab in MySQLWorkbench and it reloads it.

As an exercise, it’s worth taking a copy of the original Dump file and keeping an original copy, so if anything goes horribly wrong you can reinstate the original database.

While I was writing this post and updating the Site links I found that another of my sites, a portfolio of some of my photographs had gone offline. For some reason, I no longer owned the site imagery.cf, and so as I’d lost a domain name so had to re-map site to a new domain name. This was from Freenom,  I was not aware that it had happened and do not recollect any notice that it had happened, a bit scary, but quickly solved with going through the exercise of Dumping the Database and remapping imagery.cf to image4.cf and the site was up and running in no time.

The only issue I had was in accessing the admin of the new site. I had to add some lines to my wp_config.php file. I found this post really helpful, only I didn’t put the new lines at the very bottom but slightly further up just under the last Define……. line in the wp_config.php file and it worked great.

An Addenda to this post

I have a photographic portfolio site Imagine  that I’ve had a couple of issues with. First, my domain name suddenly disappeared from Freenom and I wasn’t told. That came as a bit of a shock, anyway I hunted out another and did the MySQLWorkbench dump file and mapped to the new address image4.cf. That was a little while ago. All good again.

I think, at the time, I also used the site for a test for an HTTPS site and so used Certify from Lets Encrypt to do that. It worked well so I used it on my DataIKnow.info site in case I needed to set up paypal or some other online payment method. All good too.

Then I put the Yoast SEO plugin onto the site and that was fine to start with, then when I was trying to check the Google Search console and test the all my sites, I got some issues.

On the other sites, with the new Search console interface I get status ” Couldn’t fetch” in red, but when I go back to the old console and test the sitemap.xml files they all worked fine, apart from my image4.cf site. I suddenly started getting 500 Errors on the site whatever I did. I had a couple of odd things on this site, firstly the login was via HTTP to the dashboard, which worked, but didn’t work for the HTTPS login, also for both HTTP & HTTPS I got a 500 error. So I asked my interwongle what to do and there are lots of wordpress posts on this. Basically:

1/ .htaccess file mogadored, rename & regenerate dashboard>settings>Permalinks  re-save permalinks (just save, its supposed to generate another .htaccess file for the site). That didn’t work.

2/Then it suggested insufficient file upload size (that shouldn’t have been a problem but I checked it out).

3/ Then start reloading bits of your directory (blowing the site away).

At this time, I thought, AHA!!! I have a backup for the site with UpdraftPlus. Well, I loaded my backup and that did not work.

I then tried creating a new site and copying all the wp-content/upload/ directory files across to the new site (These are all the image files for the site). But of course they are not mapped to the wp-database.

So I went back to my trusty we blog and found an earlier article which discusses using a plugin Add from Server to upload lots of media files onto your site. I started to do this and found it 1/ Tedious as lots of date directories, 2/ A pain as I had to delete all the photos of different sizes that were generated from the original (4-5 other photos for each image file). After wasting a lot of time on this I thought there has to be an easier way.

I was thinking of using Local and redoing all the image links to the new site and rebuilding the site from scratch.

Well there was. I had made backups of all my sites and their databases a while back. These were just copies of each site and a copy of the databases. So I just renamed my root file for the site and copied the backup across, and reloaded the database. With the database I had to do a dump file to rename the original imagery.cf to image4.cf and my site is back up and running.

The moral to this tale

  1. I was lucky. This is a pretty static site, so not lots of updates over time. So on the restore I got it back just the way it was.
  2. Very disappointed with UpdraftPlus. I have spent some time setting it up on a number of sites (the free version) and have been cleaning out sites due to BLOAT of the backups. When it came to the crunch, it didn’t do what it was meant to. So i will be uninstalling this plugin for sure. I may try another backup plugin though for another trial.
  3. Old basic ways are more reliable. I will definitely be taking a Mirror of my updated sites today and backing up my Databases.
  4. Stepping back from the issue would have made a bit of sense to think of the alternatives instead of charging in.
  5. I am very happy about my blog posts. Through them I realised I had several alternative methods to rectify the situation. Also they pointed me to the specific tools I needed at the time. Much faster than searching the interwongle again as some of the issues were very specific and I’d already researched them.

 

 

 

 

 

 

 

 

 

 

 

Add a Comment