{"id":4552,"date":"2018-11-26T08:58:45","date_gmt":"2018-11-26T08:58:45","guid":{"rendered":"https:\/\/max-drake.cc\/?p=4552"},"modified":"2018-12-09T10:27:43","modified_gmt":"2018-12-09T10:27:43","slug":"wordpress-site-relocating-links-on-another-site","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=4552","title":{"rendered":"WordPress site- relocating links on another site"},"content":{"rendered":"<p>I have a couple of demonstration sites.\u00a0 <a href=\"https:\/\/pir2.tk\/\" rel=\"noopener\"><strong>Vast<\/strong><\/a> &amp; <strong><a href=\"https:\/\/apriori.ml\/\" rel=\"home noopener\">Property Information<\/a><\/strong>.<\/p>\n<p>These are sites that I use to demonstrate certain functions of a programme or to display results.<\/p>\n<p>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&#8217;t work.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-4556 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/11\/im11-2-300x163.jpg\" alt=\"\" width=\"1631\" height=\"886\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/11\/im11-2-300x163.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/11\/im11-2-768x418.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/11\/im11-2-1024x557.jpg 1024w\" data-sizes=\"(max-width: 1631px) 100vw, 1631px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1631px; --smush-placeholder-aspect-ratio: 1631\/886;\" \/><\/p>\n<p>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&#8217;t want to spend time debugging the issue relating to the VPS at that time).<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>I looked up free hosting and found <strong><a href=\"https:\/\/www.techradar.com\/news\/best-free-web-hosting-sites-of-2018\">this article<\/a><\/strong>, and decided to give<strong> <a href=\"https:\/\/infinityfree.net\/\">infinity free<\/a><\/strong> a try.\u00a0 Sol I&#8217;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&#8217;ll need to re-establish the links from the AwardSpace URL to the Infinity URL on the websites I have on my VPS.<\/p>\n<h3>An aside about website maintenance<\/h3>\n<p>Maintenance is a constant challenge, whether to keep your data updated and how much time you wish to spend maintaining the systems and processes.<\/p>\n<p>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.<\/p>\n<p>I&#8217;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&#8217;m happy to keep the data updated.<\/p>\n<p>I&#8217;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.<\/p>\n<p>This is why I like WordPress, its free, there are lots of plugins and the sites are generally easy to manage.<\/p>\n<p>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).<\/p>\n<p>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,\u00a0 so I&#8217;m not, at this point in time, interested in updating it.<\/p>\n<p>But for the present, I need this example running on a site somewhere.<\/p>\n<h3>Moving files between servers using FTP<\/h3>\n<p><span class=\"js-about-item-abstr\">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.<\/span><\/p>\n<p><span class=\"js-about-item-abstr\"> 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&#8217;t get the parameters set up right it&#8217;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.\u00a0<\/span><\/p>\n<p>In this case, I have only figured out how to copy from one server to my PC, so I&#8217;ll copy from AwardSpace site to my PC, then transfer to Infinity site.<\/p>\n<p>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&#8217;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).<\/p>\n<p>So, once you have Filezilla setup, copy files from AwardSpace server to PC then from PC to InfinityFree.net<\/p>\n<p>Check files work with new URL (<span class=\"js-about-item-abstr\">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:<\/span><\/p>\n<p>http:\/\/astra0.dx.am\/w\/data\/MapOfCondition\/index.html<\/p>\n<p>New URL<\/p>\n<p>http:\/\/astra0.rf.gd\/w\/data\/MapOfCondition\/index.html<\/p>\n<p>(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).<\/p>\n<h3>Updating WordPress Links in Databases.<\/h3>\n<p>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:<\/p>\n<pre>UPDATE wp_posts SET post_content = REPLACE ( \u00a0post_content, \u00a0'text to find here', \u00a0'text to replace here');\r\n\r\n<\/pre>\n<blockquote class=\"wp-embedded-content\" data-secret=\"SwNVyWq8yS\"><p><a href=\"https:\/\/wpbeaches.com\/find-and-replace-across-whole-wordpress-site\/\">Find and replace text across a whole WordPress web site using phpMyAdmin<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content lazyload\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Find and replace text across a whole WordPress web site using phpMyAdmin&#8221; &#8212; WP Beaches\" data-src=\"https:\/\/wpbeaches.com\/find-and-replace-across-whole-wordpress-site\/embed\/#?secret=gokBwjcMZb#?secret=SwNVyWq8yS\" data-secret=\"SwNVyWq8yS\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\"><\/iframe><\/p>\n<p>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.<\/p>\n<p>But for MySQLWorkbench see <a href=\"https:\/\/stackoverflow.com\/questions\/11839060\/find-and-replace-text-in-the-entire-table-using-a-mysql-query\" rel=\"noopener\">this discussion<\/a>. This process works for me.<\/p>\n<p>The method of Dumping the Database to a Text File, use Notepad++ to find &amp; 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.<\/p>\n<p>As an exercise, it&#8217;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.<\/p>\n<p>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&#8217;d lost a domain name so had to re-map site to a new domain name. This was from Freenom,\u00a0 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.<\/p>\n<p>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 <a href=\"https:\/\/fixingwp.com\/using-wordpress\/cannot-access-wordpress-admin-area-after-changing-url-fix\/\" rel=\"noopener\"><strong>this post<\/strong><\/a> really helpful, only I didn&#8217;t put the new lines at the very bottom but slightly further up just under the last Define&#8230;&#8230;. line in the wp_config.php file and it worked great.<\/p>\n<h3>An Addenda to this post<\/h3>\n<p>I have a photographic portfolio site <a href=\"https:\/\/image4.cf\" target=\"_blank\" rel=\"noopener\"><strong>Imagine\u00a0<\/strong><\/a> that I&#8217;ve had a couple of issues with. First, my domain name suddenly disappeared from Freenom and I wasn&#8217;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.<\/p>\n<p>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 <a href=\"https:\/\/dataiknow.info\/\" target=\"_blank\" rel=\"noopener\"><strong>DataIKnow.info<\/strong><\/a> site in case I needed to set up paypal or some other online payment method. All good too.<\/p>\n<p>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.<\/p>\n<p>On the other sites, with the new Search console interface I get status &#8221; Couldn&#8217;t fetch&#8221; 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&#8217;t work for the HTTPS login, also for both HTTP &amp; HTTPS I got a 500 error. So I asked my interwongle what to do and there are lots of wordpress posts on this. Basically:<\/p>\n<p>1\/ .htaccess file mogadored, rename &amp; regenerate dashboard&gt;settings&gt;Permalinks\u00a0 re-save permalinks (just save, its supposed to generate another .htaccess file for the site). That didn&#8217;t work.<\/p>\n<p>2\/Then it suggested insufficient file upload size (that shouldn&#8217;t have been a problem but I checked it out).<\/p>\n<p>3\/ Then start reloading bits of your directory (blowing the site away).<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>So I went back to my trusty we blog and found an <a href=\"https:\/\/max-drake.cc\/2017\/12\/29\/setting-up-a-photographic-portfolio-in-wordpress\/\" target=\"_blank\" rel=\"noopener\"><strong>earlier article<\/strong><\/a> 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.<\/p>\n<p>I was thinking of using Local and redoing all the image links to the new site and rebuilding the site from scratch.<\/p>\n<p>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.<\/p>\n<h4>The moral to this tale<\/h4>\n<ol>\n<li>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.<\/li>\n<li>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&#8217;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.<\/li>\n<li>Old basic ways are more reliable. I will definitely be taking a Mirror of my updated sites today and backing up my Databases.<\/li>\n<li>Stepping back from the issue would have made a bit of sense to think of the alternatives instead of charging in.<\/li>\n<li>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&#8217;d already researched them.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a couple of demonstration sites.\u00a0 Vast &amp; 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&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4556,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,27],"tags":[],"class_list":["post-4552","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","category-wordpress"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/11\/im11-2.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/11\/im11-2.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/4552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4552"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/4552\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/4556"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}