{"id":14448,"date":"2015-04-23T05:04:45","date_gmt":"2015-04-22T19:04:45","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=14448"},"modified":"2015-04-24T12:38:44","modified_gmt":"2015-04-24T02:38:44","slug":"wordpress-upgrade-links-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-upgrade-links-tutorial\/","title":{"rendered":"WordPress Upgrade Links Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfuil.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Upgrade Links Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfuil.jpg\" title=\"WordPress Upgrade Links Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Upgrade Links Tutorial<\/p><\/div>\n<p>Here is today&#8217;s &#8220;moving forward&#8221; moment regarding our WordPress upgrade from version 3.0.3 to 4.1.1.   You may be wondering how relevant this is to you, and it may not be immediately applicably relevant, but you may find the approaches of generic interest when you upgrade any website and are in that in between period of settling the new website in, but not ready to let the old one go.<\/p>\n<p>Another consideration regarding &#8220;let the old one go&#8221; is, if you do move on, will the dead links on the search engines pointing at your old version mean your domain is penalized because of these dead links.  Perhaps an .htaccess \/ httpd.config arrangement left behind will fix this, but am not up to that yet.  Experts are welcome to leave comments.  This, I am not sure about, but within your own blog broken links can be checked by a WordPress plugin you can read about at <a target=_blank title='Broken Link Checker' href='https:\/\/wordpress.org\/plugins\/broken-link-checker\/'>Broken Link Checker<\/a>.<\/p>\n<p>Okay, so we&#8217;re not <a target=_blank title='Throwing out the baby with the bath water' href='http:\/\/en.wikipedia.org\/wiki\/Throw_out_the_baby_with_the_bath_water'>&#8220;throwing out the baby with the bath water&#8221;<\/a> and so how can we chip away at getting users to use the new blog website?  How about &#8230;<\/p>\n<ol>\n<li>the Recent Posts widget links<\/li>\n<li>the blog Entry Title (class=&#8217;entry-title&#8217;) light blue links on the blog<\/li>\n<\/ol>\n<p> &#8230; but not yet moving to any generic mappings via the WordPress 3.0.3&#8217;s index.php nor any .htaccess \/ httpd.config arrangements for this, just yet, as we have an issue with the blog posts during this interim period where the &#8220;?p=[postId]&#8221; doesn&#8217;t always match, and we have to plan what to do about this, and not be too kludgy &#8230; for the future.<\/p>\n<p>So what are the code changes for steps 1 and 2 above &#8230; both, further below, need new <a target=_blank title='wajax.js' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/wajax.js---------------GETME'>wajax.js<\/a> (and same for <a target=_blank title='nothing.js' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/nothing.js--GETME'>nothing.js<\/a>) function &#8230; <\/p>\n<p><code><br \/>\nfunction newblogmap(tworpinnerHTML, kj) {   \/\/ ?p=[postId] wordpress old to \/%postname%\/ permalink ITblog new ... April, 2015 ... RJM<br \/>\n  var iqwa, newidea, nideatwo, aih, aihtwo, aword, awords, niword, retval = tworpinnerHTML;<br \/>\n  if (tworpinnerHTML.indexOf(\"?p=\") != -1) {<br \/>\n  newidea = tworpinnerHTML.split(\"<\/a>\");<br \/>\n  for (iqwa=0; iqwa&lt;(newidea.length - 1); iqwa++) {<br \/>\n  if (iqwa == kj) {<br \/>\n  aih = newidea[iqwa].split(\"&gt;\");<br \/>\n  awords = aih[(aih.length - 1)].split(\" ...\");<br \/>\n  \/\/if (awords[0].indexOf(\"Walking Trip\") != -1 && document.URL.indexOf(\"?x=x\") != -1) alert(\"*\" + awords[0] + \"*\");<br \/>\n  niword = awords[0].toLowerCase().replace(\/\\\/\/g, \"\").replace(\/,\/g, \"\");<br \/>\n  \/\/if (awords[0].indexOf(\"Walking Trip\") != -1 && document.URL.indexOf(\"?x=x\") != -1) alert(\"!\" + niword + \"*\");<br \/>\n  niword = niword.trim();<br \/>\n  \/\/if (awords[0].indexOf(\"Walking Trip\") != -1 && document.URL.indexOf(\"?x=x\") != -1) alert(\"$\" + niword + \"*\");<br \/>\n  niword = \"\/ITblog\/\" + niword.replace(\/ \/g, \"-\") + \"\/\";<br \/>\n  if (awords[0].indexOf(\"Walking Trip\") != -1) niword = \"\/ITblog\/walking-trip\/\";<br \/>\n  nideatwo = newidea[iqwa].split(\"?p=\");<br \/>\n  if (nideatwo.length > 1) {<br \/>\n    aih = nideatwo[1].split('\"');<br \/>\n    aihtwo = nideatwo[1].split(\"'\");<br \/>\n    if (aih[0].length < aihtwo[0].length) {\n      aihtwo = aih[0].split(\"&#038;\");\n      aword = \"\/wordpress\/?p=\" + aihtwo[0];\n    } else {\n      aih = aihtwo[0].split(\"&#038;\");\n      aword = \"\/wordpress\/?p=\" + aih[0];\n    }\n    retval = retval.replace(aword + \"&#038;\", niword + \"?\").replace(aword + \"&#038;\", niword + \"?\").replace(aword, niword).replace(aword, niword);\n  }\n  }\n  }\n  }\n  return retval;\n}\n<\/code><\/p>\n<ol>\n<li>the Recent Posts widget links ... and we talked about this with <a target=_blank title='WordPress Recent Post Image Follow Up Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=11008'>WordPress Recent Post Image Follow Up Tutorial<\/a> and\/or <a target=_blank title='WordPress Recent Post Image Follow Up Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-post-image-follow-up-tutorial\/'>WordPress Recent Post Image Follow Up Tutorial<\/a> ... bold bits below ... affects wajax.js (and same for nothing.js) ...<br \/>\n<code><br \/>\n...<br \/>\nfunction winit() {<br \/>\n...<br \/>\n      for (var j=0; j < allPs.length; j++) {\n         if (allPs[j].id == \"text-4\") {\n...\n         } else if (allPs[j].id == \"text-5\")  {\n...\n         } else if (allPs[j].id == \"recent-posts-2\")  {   \/\/ Recent blog post Ajax previews 27\/11\/2014        \n           var ihs = allPs[j].innerHTML.split(\"?p=\");\n           var myposts;\n           var aeight=new Array(\"aone\", \"atwo\", \"athree\", \"afour\", \"afive\", \"asix\", \"aseven\", \"aeight\");\n           var ieight = aeight.length - 1;\n           for (var jhs=(ihs.length - 1); jhs>=1; jhs--) {<br \/>\n             myposts = ihs[jhs].split('\"');<br \/>\n             if ((wisiPad || wisTouch)) {<br \/>\n             if (allPs[j].innerHTML.indexOf('a href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" t') != -1) {<br \/>\n             allPs[j].innerHTML = allPs[j].innerHTML.replace('a href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" title=\"', 'a href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" style=\"margin-bottom:20px;\" ontouchend=\" yehbut(); \" id=\"' + aeight[ieight] + '\" ontouchstart=\" bpost=' + myposts[0] + ';  if (mtimer) { clearInterval(mtimer); }  tickcnt = 0; mtimer = setInterval(mchecker, 1000);  \" title=\"You can wait for the long hover functionality for a Blog Post preview ... ');<br \/>\n             } else {<br \/>\n             allPs[j].innerHTML = allPs[j].innerHTML.replace('\" href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\"', ' ... you can wait for the long hover functionality for a Blog Post preview\" href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" style=\"margin-bottom:20px;\" ontouchend=\" yehbut(); \" id=\"' + aeight[ieight] + '\" ontouchstart=\"  bpost=' + myposts[0] + ';  if (mtimer) { clearInterval(mtimer); }  tickcnt = 0; mtimer = setInterval(mchecker, 1000);  \" ');<br \/>\n             }<br \/>\n             <b>if (1 == 2) allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, eval(jhs - 1));   \/\/ not yet for mobile - map to new blog URL with permalink \/%postname%\/<\/b><br \/>\n             } else {<br \/>\n             if (allPs[j].innerHTML.indexOf('a href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" t') != -1) {<br \/>\n             allPs[j].innerHTML = allPs[j].innerHTML.replace('a href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" title=\"', 'a href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" onmouseout=\" yehbut(); \" id=\"' + aeight[ieight] + '\" style=\"margin-bottom:20px;\" onmouseover=\"  bpost=' + myposts[0] + '; setTimeout(xget, 4000); \" title=\"You can wait for the long hover functionality for a Blog Post preview ... ');<br \/>\n             } else {<br \/>\n             allPs[j].innerHTML = allPs[j].innerHTML.replace('\" href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\"', ' ... you can wait for the long hover functionality for a Blog Post preview\" href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=' + myposts[0] + '\" onmouseout=\" yehbut(); \" id=\"' + aeight[ieight] + '\" style=\"margin-bottom:20px;\" onmouseover=\"  bpost=' + myposts[0] + '; setTimeout(xget, 4000); \" ');<br \/>\n             }<br \/>\n             <b>allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, eval(jhs - 1));   \/\/ map to new blog URL with permalink \/%postname%\/<\/b><br \/>\n             }<br \/>\n             ieight = ieight - 1;<br \/>\n           }<br \/>\n      }<br \/>\n...<br \/>\n}<br \/>\n...<br \/>\n<\/code>\n<\/li>\n<li>the blog Entry Title (class='entry-title') light blue links on the blog ... bold bits below ... affects wajax.js (and same for nothing.js) ...<br \/>\n<code><br \/>\n...<br \/>\nfunction winit() {<br \/>\n...<br \/>\n      for (var j=0; j < allPs.length; j++) {\n         hdivid = allPs[j].id;\n         if (typeof hdivid == \"undefined\") {\n           hdivid = \"\";\n         } else {\n           if (hdivid.indexOf(\"post-\") != -1) {\n             hdivids = (hdivid.substring(hdivid.indexOf(\"post-\")) + \" \").split(\" \");\n             hdivid = hdivids[0];\n             hdivids = allPs[j].innerHTML.split(' class=\"entry-title\">');<br \/>\n             if (hdivids.length > 1) {<br \/>\n             clname = (\"~\" + hdivids[1]).replace('~<',' ').replace('~','');\n             hdivids = clname.split(\"<\");\n             if (hdivid != \"\" &#038;&#038; hdivids[0] != \"\") {\n               if (hdivids[0].indexOf(\">\") != -1) {<br \/>\n                clname = hdivids[0];<br \/>\n                hdivids = clname.split(\">\");<br \/>\n                hdivids[0] = hdivids[hdivids.length - 1];<br \/>\n                <b>if ((wisiPad || wisTouch)) {<br \/>\n                 wisiPad = wisiPad;<br \/>\n                } else {<br \/>\n                 allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, 0); \/\/ map to new blog with permalink \/%postname%\/<br \/>\n                }<\/b><br \/>\n               }<br \/>\n               if (hrsel.length == 0) {<br \/>\n                hrsel = \"&lt;select onchange='location.href=this.value;' id='hrsel' style='display:NONE;'&gt;&lt;OPTION value='#\" + hdivid + \"'&gt;\" + hdivids[0] + \"&lt;\/option&gt;&lt;\/select&gt;&lt;br&gt;\";<br \/>\n               } else if (hrsel.indexOf(hdivids[0]) == -1) {<br \/>\n                hrsel = hrsel.replace(\"&lt;\/option&gt;&lt;\/select&gt;\", \"<\/option&gt;&lt;OPTION value='#\" + hdivid + \"'&gt;\" + hdivids[0] + \"&lt;\/option&gt;&lt;\/select&gt;\");\n               }\n             }\n            }\n           }\n         }\n         if (allPs[j].id == \"access\") {\n           if ((wisiPad || wisTouch)) {\n           allPs[j].ontouchstart = getGradient;\n           allPs[j].ontouchend = yehBut;\n           } else {\n           allPs[j].onmouseover = getGradient;  \/\/ 10640\n           if (allPs[j].title.indexOf(\" ...\") == -1) {\n             allPs[j].title = allPs[j].title + \" ... welcome to the long hover functionality that shows Blog Post regarding CSS3 Gradient\";\n           }\n           allPs[j].onmouseout = yehBut;\n           }\n         }\n      }\n...\n      if (navigator.userAgent.toLowerCase().indexOf(\"ie\") != (0 - 1)) {\n       allPs = document.getElementsByTagName('p');\n      } else {\n       allPs= document.getElementsByTagName('p');\n      }\n...\n      for (var j=0; j < allPs.length; j++) {\n         hdivid = allPs[j].id;\n         if (typeof hdivid == \"undefined\") {\n             hdivid = \"\";\n         } else {\n             hdivids = allPs[j].innerHTML.split(\">\");<br \/>\n             if (hdivids.length > 1) {<br \/>\n             clname = (\"~\" + hdivids[1]).replace('~<',' ').replace('~','');\n             hdivids = clname.split(\"<\");\n             if (hdivids[0].indexOf(\">\") != -1) {<br \/>\n              clname = hdivids[0];<br \/>\n              hdivids = clname.split(\">\");<br \/>\n              hdivids[0] = hdivids[hdivids.length - 1];<br \/>\n                <b>if ((wisiPad || wisTouch)) {<br \/>\n                 wisiPad = wisiPad;<br \/>\n                } else {<br \/>\n                 allPs[j].innerHTML = newblogmap(allPs[j].innerHTML, 0); \/\/ map to new blog with permalink \/%postname%\/<br \/>\n                }<\/b><br \/>\n             }<br \/>\n             if ((hrsel + \"*\").indexOf(\"&lt;option \") == -1 || hrsel.length == 0) {<br \/>\n              if (hdivid != \"\" && hdivids[0] != \"\") {<br \/>\n               if (hrsel.length == 0) {<br \/>\n                 hrsel = \"&lt;select onchange='location.href=this.value;' id='hrsel' style='display:NONE;'&gt;&lt;option value='#\" + hdivid + \"'&gt;\" + hdivids[0] + \"&lt;\/option&gt;&lt;\/select&gt;&lt;br&gt;\";<br \/>\n               } else if (hdivids[0].substring(0,1) &gt;= \"A\" && hdivids[0].substring(0,1) &lt;= \"Z\" && hrsel.indexOf(hdivids[0]) == -1) {<br \/>\n                 hrsel = hrsel.replace(\"&lt;OPTION \", \"&lt;option value='#\" + hdivid + \"'&gt;\" + hdivids[0] + \"&lt;\/option&gt;&lt;OPTION \");<br \/>\n               } else if (hdivids[0].substring(0,1) &gt;= \"A\" && hdivids[0].substring(0,1) &lt;= \"Z\") {<br \/>\n                 hrsel = hrsel.replace(\"&lt;OPTION \", \"&lt;option \");<br \/>\n               }<br \/>\n              }<br \/>\n             } else {<br \/>\n              if (hdivid != \"\" && hdivids[0] != \"\") {<br \/>\n               if (hrsel.length == 0) {<br \/>\n                 hrsel = \"&lt;select onchange='location.href=this.value;' id='hrsel' style='display:NONE;'&gt;&lt;option value='#\" + hdivid + \"'&gt;\" + hdivids[0] + \"&lt;\/option&gt;&lt;\/select&gt;&lt;br&gt;\";<br \/>\n               } else if (hdivids[0].substring(0,1) &gt;= \"A\" && hdivids[0].substring(0,1) &lt;= \"Z\" && hrsel.indexOf(hdivids[0]) == -1) {<br \/>\n                hrsel = hrsel.replace(\"&lt;\/option&gt;&lt;\/select&gt;\", \"&lt;\/option&gt;&lt;option value='#\" + hdivid + \"'&gt;\" + hdivids[0] + \"&lt;\/option&gt;&lt;\/select&gt;\");<br \/>\n               }<br \/>\n              }<br \/>\n             }<br \/>\n             }<br \/>\n         }<br \/>\n      }<br \/>\n...<br \/>\n}<br \/>\n...<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p>Hope this also can help in some way for your work.<\/p>\n<hr>\n<p id=\"wuit\">Previous relevant <a target=_blank title='WordPress Upgrade Implications Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-upgrade-implications-tutorial\/'>WordPress Upgrade Implications Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfui.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Upgrade Implications Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfui.jpg\" title=\"WordPress Upgrade Implications Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Upgrade Implications Tutorial<\/p><\/div>\n<p>Yesterday we saw with <a title='WordPress Upgrade Follow Up Tutorial' href='#wufut'>WordPress Upgrade Follow Up Tutorial<\/a> as shown below that WordPress has a great Export and Import <a target=_blank href='https:\/\/wordpress.org\/plugins\/wp-exporter\/' title='WordPress Export and Importer plugin'>plugin<\/a> to help migrate data after you upgrade your WordPress version.  By the way, it is worth noting with this, that two WordPress default <a target=_blank title='WordPress widget information' href='http:\/\/codex.wordpress.org\/WordPress_Widgets'>Widgets<\/a> are useful as sanity checks for how the data migration is going ...<\/p>\n<ol>\n<li>Archives and\/or<\/li>\n<li>Calendar<\/li>\n<\/ol>\n<p> ... particularly if you are like us, and publish once a day.<\/p>\n<p>Anyway, it is now time, once you are happy with data migration to turn to the implications of a happy data migration which is one where the default permalink \"?p=[postId]\" is equivalent for old and new websites, but the new website also accepts \"\/%postname%\/\" permalinks (in our case).  This means that, with care, instead of \"\/wordpress\/\" being in users' URLs you can ease them into \"\/ITblog\/\" replacing that in their URLs.  So why the trepidation, why the \"with care\" bit?  Well, I'm not sure, to be honest, whether all this contravenes a fairly big search engine (SEO) sin of having duplicate data.  I'm, of course, hoping that with the search engine view of the Blog Post titles having that extra (middle name) \"James\" in them, plus a different \"\/%postname%\/\" permalink URL associated with them (but unfortunately with the same content) whether this will be enough to potter along for a while with both WordPress versions, while all the teething issues are sorted out, or whether the data migration will cause grief at the search engines ... am an optimist here, but will keep you posted on that.   You may wonder, why don't we just cut over ... well, maybe, one day, but am sure it is a thing to ease into, rather than a snap decision, especially as the snap decision does not improve anything about the \"duplicate content\" doubt up at the search engines.<\/p>\n<p>So, back at the matter at hand ... considerations of what can improve once a good data migration is achieved.  Here's one we can think of.  If you are an attentive reader at this blog you may know about the PHP code of <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php---GETME' title='recent-posts-2.php'>recent-posts-2.php<\/a> which was first talked about with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-post-image-primer-tutorial\/' title='WordPress Recent Post Image Primer Tutorial'>WordPress Recent Post Image Primer Tutorial<\/a> and last changed (and talked about first regarding that) with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/ffmpeg-image-optimization-primer-tutorial\/' title='FFmpeg Image Optimization Primer Tutorial'>FFmpeg Image Optimization Primer Tutorial<\/a>.  Well, we changed the code as per <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php---GETME' title='recent-posts-2.php'>this link<\/a> because now wherever a URL has \"\/wordpress\/\" it can now be safely mapped to \"\/ITblog\/\" and be hooking into the new WordPress blog website that way, as reflected by <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html' title='zero.html'>zero.html<\/a><\/p>\n<p>So over coming days recognising these functionality improvements could be the go (like, do we do some <i>.htaccess<\/i> work or rather what we lean towards now, some mapping amendments at the WordPress 3.0.3 index.php end of things?), and it occurs to us to leave several days (to try things out (perhaps on a MAMP local web server, first)) for WordPress Blog upgrade work, to facilitate the changeover methodically.  In the meantime here is today's <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfui.jpg\" title='Click picture'>functionality change<\/a>.<\/p>\n<\/p>\n<p><b>Did you know?<\/b><\/p>\n<p>With using permalink \/%postname%\/ it sets you, on a Linux web server, in particular, to think about URL uppercase\/lowercase confusion.  After all, it is natural that somebody will wonder, with a URL such as ...<\/p>\n<p><code>https:\/\/www.rjmprogramming.com.au\/ITblog\/swift-dictionaries-and-arrays-primer-tutorial\/<\/code><\/p>\n<p> ... whether ... <\/p>\n<p><code>http:\/\/www.rjmprogramming.com.au\/itblog\/swift-dictionaries-and-arrays-primer-tutorial\/<\/code><\/p>\n<p> ... or even ...<\/p>\n<p><code>http:\/\/www.rjmprogramming.com.au\/ITBLOG\/swift-dictionaries-and-arrays-primer-tutorial\/<\/code><\/p>\n<p> ... would also work, and with Apache \/ mod_rewrite \/ .htaccess  \/ httpd.conf considerations ... yes, it is possible (as long as mod_rewrite is installed).  Let's look at the web server alternative to <i>ITblog<\/i> folder called <i>itblog<\/i> (gobsmacked Windows (perhaps ASP.Net web server) afficianados cannot have this differentiation but also don't have the issue to worry about in the first place ... here's the HTML <i>a<\/i> element information from w3schools in <a target=_blank title='HTML a link advice from w3schools in lowercase' href='http:\/\/www.w3schools.com\/tags\/tag_a.asp'>lowercase<\/a> and (bits of) <a target=_blank title='Same HTML a link advice from w3schools in (bits of) uppercase' href='http:\/\/www.w3schools.com\/TagS\/tag_a.asp'>uppercase<\/a> (with its URL) ... anyone for a bit of I.T. <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/8.3_filename' title='DOS 8 letter filenames information from Wikipedia ... thanks'>history<\/a>?) and what that new web server folder needs to make this happen to have this extra \"convenience\" ...<\/p>\n<ol>\n<li>httpd.conf change (for us, here, because we only allow .htaccess functionality, on a folder by folder decision basis ... changes to httpd.conf need an Apache restart to happen, but a change to .htaccess should not need such a restart for the change to take effect)<br \/>\n<code><br \/>\n&lt;Directory [path to new <i>itblog<\/i> directory]&gt;<br \/>\n    # ... other directives...<br \/>\n    AllowOverride All<br \/>\n &lt;\/Directory&gt;<br \/>\n<\/code>\n<\/li>\n<li>.htaccess (in new <i>itblog<\/i> directory ... chmod 644 ... in large part, the same as WordPress installation's .htaccess file created in the <i>ITblog<\/i> directory)<br \/>\n<code><br \/>\n# BEGIN WordPress<br \/>\n&lt;IfModule mod_rewrite.c&gt;<br \/>\nRewriteEngine On<br \/>\nRewriteBase \/itblog\/<br \/>\nRewriteRule ^index\\.php$ - [L]<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule . \/ITblog\/index.php [L]<br \/>\n&lt;\/IfModule&gt;<br \/>\n# END WordPress<\/code>\n<\/li>\n<li>index.html (in new <i>itblog<\/i> directory)<br \/>\n<code><br \/>\n&lt;html&gt;                                                                       &lt;body onload=\" location.href = document.URL.replace('\/itblog', '\/ITblog'); \"&gt;                                                                              &lt;\/body&gt;                                                                      &lt;\/html&gt;<br \/>\n<\/code>\n<\/li>\n<li>index.php (in new <i>itblog<\/i> directory)<br \/>\n<code><br \/>\n&lt;?php                                                                              header(\"Location: ..\/ITblog\/index.php?\" . $_SERVER['QUERY_STRING']);                                                         ?&gt;<br \/>\n<\/code>\n<\/li>\n<\/ol>\n<p> ... meaning that a misspelled URL with \"\/itblog\" (which is quite understandable) should function the same as the \"\/ITblog\" version.<\/p>\n<hr>\n<p id='wufut'>Previous relevant <a target=_blank title='WordPress Upgrade Follow Up Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-upgrade-follow-up-tutorial\/'>WordPress Upgrade Follow Up Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfu.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Upgrade Follow Up Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfu.jpg\" title=\"WordPress Upgrade Follow Up Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Upgrade Follow Up Tutorial<\/p><\/div>\n<p>WordPress has a great Export and Import <a target=_blank href='https:\/\/wordpress.org\/plugins\/wp-exporter\/' title='WordPress Export and Importer plugin'>plugin<\/a> to help migrate data after you upgrade your WordPress version, perhaps.<\/p>\n<p>This came to the fore yesterday when we started (there is a lot more to do) on that migration path going from WordPress version 3.0.3 to version 4.1.1 as you can read a bit about with <a title='WordPress Upgrade Primer Tutorial' href='#wupt'>WordPress Upgrade Primer Tutorial<\/a> as shown below.<\/p>\n<p>So the two parts to the Export and Import equation are ...<\/p>\n<ol>\n<li>Export from WordPress 3.0.3<\/li>\n<li>Import into WordPress 4.1.1<\/li>\n<\/ol>\n<p>... now you may naively think that you will be able to export once and import once, but various things may get in your way achieving that ...<\/p>\n<ol>\n<li>the small settings for max_execution_time (eg. 30 should be temporarily 360) and max_input_time (eg. 60 should be temporarily 120) and memory_limit (eg. 70M should be temporarily 128M) in php.ini need to suit the memory requirements needed to create the Export file you upload to the live server<\/li>\n<li>even fixing requirement for step 1 you may (or the symptom of needing to do something as advised in step 1), as you Export, get the PHP error message \"Fatal error:  Maximum execution time of ? seconds exceeded in ...\" ... where ? was 30 for us here ... this error message will appear in the last line of the Export file so <br \/><i><a target=_blank title='Linux tail command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/utail.htm'>tail<\/a> -2 wordpress.2014-04-01.2014-07-01.xml<\/i><\/br> would have been a Linux programmatical way of checking for the scenario shown a bit below<\/li>\n<li>the small settings for upload_max_filesize (eg. 2M should be temporarily 32M) and post_max_size (eg. 8M should be temporarily 32M) in php.ini need to suit the size of the Import file you upload to the live server<\/li>\n<li>even fixing requirement for step 3 you may (or the symptom of needing to do something as advised in step 3), as you Import, get the PHP error message \"Fatal Error: Allowed Memory Size of ? Bytes Exhausted\" ... where ? is a fairly big number ... and this error message may show on your web page window<\/li>\n<\/ol>\n<p>So it is probably better to do this job in chunks.  We think if there is a blog posting each day a three month span (or perhaps one month span) of Export could be good if comments are included as well.  And how to exclude the comments?   Supposing your Start Date is April 2014 and End Date is June 2014 then, at Linux ...<\/p>\n<p><code><br \/>\n$ <a target=_blank title='Linux cat command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/ucat.htm'>cat<\/a> wordpress.2014-04-01.2014-07-01.xml | <a target=_blank title='Linux awk command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/used.htm'>sed<\/a> '\/^[ \\t]*&lt;wp:comment&gt;\/s\/\/&lt;wp:comment&gt;\/g' | sed '\/^[ \\t]*&lt;\\\/wp:comment&gt;\/s\/\/&lt;\\\/wp:comment&gt;\/g' &gt; xwordpress.2014-04-01.2014-07-01.xml<br \/>\n$ cat xwordpress.2014-04-01.2014-07-01.xml | <a target=_blank title='Linux awk command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/uawk.htm'>awk<\/a> '\/&lt;wp:comment&gt;\/,\/&lt;\\\/wp:comment&gt;\/' &gt; comment_2014_4.xml<br \/>\n$ <a target=_blank title='Linux comm command information from computerhope' href='http:\/\/www.computerhope.com\/unix\/ucomm.htm'>comm<\/a> -23 xwordpress.2014-04-01.2014-07-01.xml comment_2014_4.xml &gt; no_comment_2014_4.xml<br \/>\n<\/code><\/p>\n<p> ... would result in a suitable no_comment_2014_4.xml to Import into the WordPress MySql database.  We thank <a target=_blank href='http:\/\/stackoverflow.com\/questions\/152708\/how-can-i-search-for-a-multiline-pattern-in-a-file' title='Linux awk advice'>this link<\/a> and <a target=_blank href='http:\/\/stackoverflow.com\/questions\/14473090\/find-lines-from-a-file-which-are-not-present-in-another-file' title='Link comm command advice'>this link<\/a> and <a target=_blank title='Export memory issue' href='http:\/\/stackoverflow.com\/questions\/5164930\/fatal-error-maximum-execution-time-of-30-seconds-exceeded'>this link<\/a>.<\/p>\n<p>More WordPress upgrade information tomorrow.  Thanks for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpupfu.jpg\" title='Click picture'>reading<\/a>.<\/p>\n<hr>\n<div id='wupt'>\n<p>Previous relevant <a target=_blank title='WordPress Upgrade Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-upgrade-primer-tutorial\/'>WordPress Upgrade Primer Tutorial<\/a> is shown below.<\/p>\n<\/div>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpup.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"WordPress Upgrade Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/wpup.jpg\" title=\"WordPress Upgrade Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">WordPress Upgrade Primer Tutorial<\/p><\/div>\n<p>It's early days, and there is more to be done, but here at this WordPress blog we're transitioning to version 4.1.1 from 3.0.3<\/p>\n<p>Three major decisions involved ...<\/p>\n<ol>\n<li>Do I keep the same theme?\n<ul>\n<li>This one depends a bit, and we feel the answer stems from how you go piecing together on a local MAMP web server, for the MacBook Pro example, and how long you think it would take to transition in a change of theme.  With this upgrade we tinkered with themes Twenty Fourteen, Twenty Thirteen and Twenty Fifteen with degrading success, and plumped instead to reinstall our previous theme Twenty Ten.  Think it was a good decision, as if you are sticking with WordPress default themes, Twenty Ten is still a good theme in my opinion.  Of course, you may have your own theme you like in mind and then you should invest the hours it will take to transition all the styling changes inherent in a shift of theme.<\/li>\n<\/ul>\n<\/li>\n<li>Do I change the permalink arrangement?<\/li>\n<ul>\n<li>In our previous WordPress blog we were using the default \"?p=[postId]\" arrangement which the search engines do not like ... and you can understand why, in that to glean the best categorization of a webpage's content gist, the search engines have to parse the whole page, whereas a permalink arrangement such as ...<br \/>\n<code><br \/>\n\/%postname%\/<br \/>\n<\/code><br \/>\nteamed up with a meaningful title, can tell a search engine so much about the webpage content just from its URL.  So we went ahead and tried for the best option we'd read about, as above, and it all worked well at MAMP but getting to the live server we needed the great advice of <a target=_blank title='Useful link' href='http:\/\/codex.wordpress.org\/Using_Permalinks'>this link<\/a> from a WordPress forum, and it panned out for us that the WordPress install was doing everything right as far as its \".htaccess\" file was concerned, but in our \"httpd.conf\" Apache configuration file we needed to specify ...<br \/>\n<code><br \/>\n&lt;Directory [path to new WordPress document root directory]&gt;<br \/>\n    # ... other directives...<br \/>\n    AllowOverride All<br \/>\n &lt;\/Directory&gt;<br \/>\n<\/code><br \/>\nto make things better<\/li>\n<\/ul>\n<li>Do I filter comments more?\n<ul>\n<li>Definitely that would be good, and the great choice is between the Akismet plugin and Captcha option, or both, and as we suspected, we think more people like Akismet here, and I've always liked it more too, because Captcha excludes some users from ever accessing your blog.  Akismet was already installed with WordPress, and activation for a personal blog like this one just involves getting an API_KEY from Akismet ... so thanks a lot.\n<\/li>\n<\/ol>\n<p>As you may imagine, this is an ongoing story, with more twists and turns to come.  Hope you'll join us for more information into the future, and hope to see you back at the new blog soon.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d14327' onclick='var dv=document.getElementById(\"d14327\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=wordpress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d14327' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d14351' onclick='var dv=document.getElementById(\"d14351\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=database\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d14351' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d14410' onclick='var dv=document.getElementById(\"d14410\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=curl\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d14410' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d14448' onclick='var dv=document.getElementById(\"d14448\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/?tag=blog\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d14448' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here is today&#8217;s &#8220;moving forward&#8221; moment regarding our WordPress upgrade from version 3.0.3 to 4.1.1. You may be wondering how relevant this is to you, and it may not be immediately applicably relevant, but you may find the approaches of &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-upgrade-links-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,12,19,37],"tags":[42,85,151,292,293,438,439,1515,707,885,1512,932,997,1111,1120,1319,1345,1411,1456],"class_list":["post-14448","post","type-post","status-publish","format-standard","hentry","category-data-integration","category-elearning","category-installers","category-tutorials","tag-htaccess","tag-apache","tag-blog","tag-data-integration-2","tag-data-migration","tag-firebug","tag-firefox","tag-httpd-conf","tag-linux","tag-operating-system-2","tag-permalinks","tag-php","tag-programming","tag-search-engine","tag-seo","tag-tutorial","tag-url","tag-web-server","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/14448"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=14448"}],"version-history":[{"count":11,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/14448\/revisions"}],"predecessor-version":[{"id":14506,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/14448\/revisions\/14506"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=14448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=14448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=14448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}