Site News – CB-Net Tech snippets and my personal knowledgebase! Wed, 10 Jan 2018 22:05:21 +0000 en-GB hourly 1 https://wordpress.org/?v=6.7.1 /wp-content/uploads/2018/01/cropped-Adobe-Spark-8-32x32.png Site News – CB-Net 32 32 Increasing page width in the WordPress Theme Twenty Seventeen /site-news/wordpress/increasing-page-width-wordpress-theme-twenty-seventeen/ /site-news/wordpress/increasing-page-width-wordpress-theme-twenty-seventeen/#respond Sun, 07 Jan 2018 10:46:42 +0000 /?p=1327 As-per : https://www.vanilla-wp.org/twenty-seventeen-theme-full-width-wordpress/

You can increase the displayed page width in the Twenty Seventeen theme using the following “Additional CSS” (can be found under Customise > Additional CSS).

To modify the percentage of the screen that can be used change this percentage **only** – the other percentages affect padding/ borders etc and will affect how appears on smaller displays.

@media screen and (min-width: 48em) {
 .wrap {
 max-width: 70%;
 /* padding-left: 3em; */
 /* padding-right: 3em; */
 }
}

Full Additional  CSS to add to your site set to 70% width:

.wrap {
 /* margin-left: auto; */
 /* margin-right: auto; */
 max-width: 100%;
 /* padding-left: 2em; */
 /* padding-right: 2em; */
}
 
@media screen and (min-width: 48em) {
 .wrap {
 max-width: 70%;
 /* padding-left: 3em; */
 /* padding-right: 3em; */
 }
}
 
.page.page-one-column:not(.twentyseventeen-front-page) #primary {
 /*margin-left: auto;*/
 /*margin-right: auto;*/
 max-width: 100%;
}

@media screen and (min-width: 30em) {
 .page-one-column .panel-content .wrap
 {
 max-width: 100%;
 }
}
]]>
/site-news/wordpress/increasing-page-width-wordpress-theme-twenty-seventeen/feed/ 0
Enabling WordPress SSL using Cloudflare Flexible SSL /site-news/wordpress/enabling-wordpress-ssl-using-cloudflare-flexible-ssl/ /site-news/wordpress/enabling-wordpress-ssl-using-cloudflare-flexible-ssl/#respond Fri, 31 Mar 2017 17:35:44 +0000 /?p=1155 Enabling SSL within WordPress is not a simple task if you rely upon the “flexible SSL” offering from CloudFlare. You will end up with SSL infinite redirects and will likely be unable to get into your admin interface without editing config files.

Getting this to work though, with the help of a plugin, can be relatively straight-forwards.

First, you need to install the following plugin on your WordPress installation: https://wordpress.org/plugins/cloudflare-flexible-ssl/

Next, within the CloudFlare configuration for your domain, browse to “Page Rules” – you want to create a new Page Rule:

Enter http://www.<your domain>.<name>/* – for example http://www.cb-net.co.uk/* and then, from the drop down box, select “Always use HTTPS” – finally, click “Save and Deploy:”

That’s it.. browse to your site’s URL and confirm the traffic is automatically redirected to HTTPS.

You do not have to change the WordPress config – to re-enable HTTP access remove the CloudFlare rule.

]]>
/site-news/wordpress/enabling-wordpress-ssl-using-cloudflare-flexible-ssl/feed/ 0
Site Migration from Joomla to WordPress /site-news/site-migration-from-joomla-to-wordpress/ /site-news/site-migration-from-joomla-to-wordpress/#comments Mon, 19 Sep 2016 16:40:58 +0000 http://wp.cb-net.co.uk/?p=3 So, I’ve just competed a move of CB-Net from Joomla to WordPress – the process was surprisingly easy, although there were a couple of gotchas I thought I would share, as well as the process from start to finish.

Migration Pre-Requisites

I won’t cover how to deploy WordPress in this article, this is well documented here. This post assumes you have a fresh, working, WordPress install and a pre-populated Joomla site.

In my case, I had deployed WordPress, temporarily, to wp.cb-net.co.uk, whilst my production Joomla site was running at www.cb-net.co.uk. Both Joomla and WordPress sites have to be running at the same time to facilitate the migration outlined below.

Other information you will need to complete the migration – available from your Joomla configuration.php file if you are unsure.

> Joomla site URL
> Joomla site MySQL database server name
> Databse poryt
> Database name
> Username
> Password

I’ll stress the need for backups at this stage. Backup your Joomla site, and backup your WordPress site, hell backup everything. And be sure you know how to restore those backups, you may need them. If you lose your data its your responsibility, not mine!

WordPress Configuration

This is pretty straightforwards, assuming you have a fresh WordPress instance up and running you’ll just need to install and activate the FG Joomla to WordPress plugin, found here.

The Migration / Import Itself

Under Plugins | Installed Plugins, under “FG Joomla to WordPress”  click “Import” to start the migration wizard.

You’ll need to enter / confirm the following information to be able to start the process.

Joomla web site parameters
> URL of the live Joomla web site


Joomla database parameters
> Hostname
> Port
> Database
> Username
> Password
> Joomla Table Prefix

Once entered, hit “Start / resume the import” and review the output form the log which appears in real-time. Hopefully you’ll have no issues, however if you do I suggest you head-over to the support forum for this plugin here.

At this stage, do not modify internal links – unless you are already running your WordPress instance on the desired URL.

Keeping the URL The Same

Ultimately, I wanted to ensure that the site was running on www.cb-net.co.uk, not wp.cb-net.co.uk.

From the WordPress Dashboard go to Settings| General, you need to change the URL under “WordPress Address (URL)” and “Site Address (URL).” Note, when you do this you will lose access to your site, that ism until you move the files/content to the folder associated with the new/desired URL.

Now, from your hosting providers console / GUI or shell (your choice, and the process itself will vary wildly) you need to move the files associated with your Joomla site (remember, you have a backup right?) to a temporary folder and then, move the files associated with the WordPress install into the folder that Joomla once resided. For me this meant:

1. Moving files from /cb-net.co.uk-root/ to /tmp/ (moving Joomla out)
2. Moving files from /wp-cb-net.co.uk/ to /cb-net.co.uk-root/ (moving WordPress in)

Once completed, you should be able to browse to the WordPress site, on the desired URL; for my WordPress instance that was originally deployed to wp.cb-net.co.uk was now available at www.cb-net.co.uk, where Joomla once resided.

Finally, for this section, go back to Plugins | Installed Plugins, under “FG Joomla to WordPress” click “Import” to finish-off the migration wizard. Scroll to the bottom and click the “modify internal links” button.

URL Redirection (maintaining legacy URLs)

My previous site had been “live” for 8 years, I had saved links, and I know others did too – it was important that I was able to still service those legacy URLs, without that need getting in the way of the platform move to WordPress. The URLs before and after the migration were very different:

Before: /citrix-articles/16-presentation-server/25-troubleshooting-citrix-session-poor-response-high-latency$ 

After: /citrix-articles/server/troubleshooting-citrix-session-poor-response-high-latency

Come to the rescue the .htaccess file and, specifically, mod_rewrite.

I got a copy of the sitemap (using a plugin) for my Joomla site, took all of the URLs and created a before and after in Excel. I then simply copied these URLs into an online tool, found here, to create the htaccess rewrite rules.

Note that under Settings | Permalinks I had configured a “custom structure” for links to be:

/%category%/%postname%/

An example rule can be seen below – note that I had to put these rules at the top of the .htacces file, otherwise these rules did not work.

With this done, you’re done – content migrated and old links work.

# BEGIN CB-Net Redirects folling WordPress Migration
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^citrix-articles/16-presentation-server/25-troubleshooting-citrix-session-poor-response-high-latency$ /citrix-articles/server/troubleshooting-citrix-session-poor-response-high-latency/? [L,R=301]
</IfModule>
]]>
/site-news/site-migration-from-joomla-to-wordpress/feed/ 2
Joomla : Using a CDN/Setting Up Your Own /site-news/general-site-news/joomla-bluehost-setting-up-your-own-cdn/ /site-news/general-site-news/joomla-bluehost-setting-up-your-own-cdn/#respond Fri, 13 Apr 2012 15:14:14 +0000 http://wp.cb-net.co.uk/2012/04/13/joomla-bluehost-setting-up-your-own-cdn/ Joomla : Using a CDN/Setting Up Your Own

Like me you’ve probably read the hype about Content Delivery Networks that keeps doing the rounds. Want to energize/supercharge your blog?!…heh.

Still, being in the mood to improve the sites I host I decided to give it a go and see if the reality lived up to the hype. I suppose part of me missed the feature I never got to properly try on iPage – the Akamai CDN plugin. This would probably have been easier to setup with that!

Why?!

Why you ask? Well the science behind it is simple really. Most modern browsers support up to 6 concurrent connections per hostname (http://www.browserscope.org/?category=network&v=top), by using multiple hostnames you can download content in parallel, or put simply, using two hostnames would allow 12 concurrent connections for your site content, three would provide 18 etc. There are limits as to how effective this become, and most would suggest that you don’t go above four hostnames for your content. You’ve also got to have the bandwidth available to download using all of these concurrent connections so those poor users still on dial-up are unlikely to benefit much.

Who and Where?!

There are a lot of paid services from companies like Akamai, MaxCDN and Amazon, and there are a few free services from companies like CoralCDN, CloudFlare and Incapsula, you can also setup your own CDN (a very limited version of any of the previously mentioned companies) using a subdomain, I’ll also show you how to do this. Using a paid for service, like most things in life, will get you the most functionality, but that doesn’t mean that the others are worth a look.

For my requirements a paid for service wasn’t really necessary so I opted to try CloudFlare and also making my own subdomain and serving content from there. Again, as per my recent article on hosting companies, I’m not fussed which one you choose, or if you choose to use one at all in fact – I opted to use my own subdomain in the end. Why do I say limited? Simply because you’re still restricted to a single host really, and the same host if you follow my guide below. Using a provider like CoralCDN or CloudFlare you’re providing content closer to your users as these networks have servers around the globe as opposed to your single(?) server.

Many other options are out there, this article is designed to get you looking at what is available and testing a few of these options.

 

CloudFlare (or Incapsula)

Initially I setup a free account with Cloudflare and moved this website across. The setup is relatively simple, in a nutshell all you need to do is:

  1. Sign up for an account with Cloudflare or indeed Signup for an account with Incapsula
  2. Change the DNS server with your registrar (you probably shouldn’t be doing this if you don’t know how!)
  3. Wait 24 hours for statistics to show in your account

Some of the benefits of CloudFlare (or similar with Incapsula) I particularly liked, amongst others, are:

  1. Offload bandwidth requirements for static content
  2. Additional security including a challenge/response page from known troublesome IP’s (some may not like this)
  3. Add IPv6 connectivity at the touch of a button

The end result with CloudFlare was that I had visibility of a number of inbound threats to the site which I was unaware of. That said there was very limited feedback as to what exactly those threats were; more information available if I had the paid service – which to be honest I can’t argue with. That said, I’m not sure the site was any faster, GTMetrix showed improved grades but slightly increased page load times. The difference was only a couple of seconds, but that seemed to defeat the object.

I was also slightly uncomfortable with handing over control of my domain’s DNS to a service provider I’m not paying anything to… yes I’m probably a control freak, but I’m always suspicious when I’m getting something for nothing. I’m going to revisit the CloudFlare TOS when I have time, maybe I can convince myself this is not an issue!

At the end of the day, there is no bandwidth limit on using the free package, improved security and even caching of your site when your server is unavailable (for a limited period).

CoralCDN

Another freebie, with limited functionality but worth considering is CoralCDN. You’ll find you are able to browse your site using the url http://yourdomain.com.nyud.net – this is the CoralCDN. In order to take advantage of this CDN simply edit you .htaccess file using the following lines, changing yourdomain.com to match the site you wish to provide the CDN for:

  Header append X-Coral-Control “redirect-home”

  RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx

  RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$

  RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png)$ [NC]

  RewriteRule ^(.*)$ http://yourdomain.com.nyud.net/$1 [R,L]

There are some error detection features built into this code which is a modification of code that is available here.

Again, YMMV but I saw increased load times, despite my GTmetrix grades staying the same.. 3 seconds to 43 seconds does not warrant the same grade!!

The DIY Approach

So free is not cheap enough for you, or you simply want to keep control of what is yours. Note that this is a DIY specific to Bluehost and Hostmonster simply because this is what I have access to. Essentially, regardless of your hosting solution,  all you need to do is create a subdomain that shares the same document root as the website you’re setting the CDN up for in the first place. This is really important as it means you wont have to keep the content sync’d across multiple folders.

  1. From your cPanel select Subdomains
  2. Create a new subdomain, for example cdn.yourdomain.com – ensure the document root is the same as your website that you want to use the CDN for. 
  3. Finally modify your .htaccess file to include the following lines:

  RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]

  RewriteCond %{REQUEST_FILENAME} \.(css|js|txt|ico|pdf)$ [NC]

  RewriteRule ^(.*) http://cdn.yourdomain.com /$1 [R,L]

This will simply redirect all css, js, txt, ico and pdf files to your new subdomain. You can change what is redirected by modifying the REQUEST_FILENAME filter which is set to (css|js|txt|ico|pdf), to add zip files for example change this to (css|js|txt|ico|pdf|zip) .

Whilst the GTmetrix benchmark grades didn’t really shift that much I definitely noticed improved load times from doing this, but as always YMMV. Again, we’re not talking significant margins, at the end of the day there isn’t that much content on the site.

Good luck with whichever solution you decide works best for you, bear in mind that this is probably not necessary in the majority of situations – high traffic and high bandwidth sites will more than likely benefit from either solution, that said, if you’re like me and can’t leave these things alone, there is still some benifit to be had.

]]>
/site-news/general-site-news/joomla-bluehost-setting-up-your-own-cdn/feed/ 0
Hosting Move Complete /site-news/general-site-news/hosting-move-complete/ /site-news/general-site-news/hosting-move-complete/#respond Wed, 11 Apr 2012 22:12:43 +0000 http://wp.cb-net.co.uk/2012/04/11/hosting-move-complete/ Well that was easy… Move was completed today, no downtime… thank you Akeeba backup/kickstart – seriously good product if you are using Joomla, I even use it to create my dev sites. Took me less than 15 minutes to move this site, including the FTP transfers!

The site also seems to be a little nippier; so long Hostmonster, hello Bluehost 🙂

]]>
/site-news/general-site-news/hosting-move-complete/feed/ 0
Hosting Nightmare /site-news/general-site-news/hosting-nightmare/ /site-news/general-site-news/hosting-nightmare/#respond Mon, 09 Apr 2012 21:43:19 +0000 http://wp.cb-net.co.uk/2012/04/09/hosting-nightmare/ Its that time, I’ve had the renewal reminder and Hostmonster are offering renewal at an inflated price, as every hosting company does (and insurance company or that matter, whatever happened to customer loyalty?) – so I do what anyone would do and trawl the ‘net trying to find the best hosting deal out there.

Right… before we go any further lets make something clear. I have nothing to gain from this article, no allegiance to ANY hosting company. Currently the site your now reading from is running on Hostomster, why..? Because I didn’t have the time to review the hosting packages available to me at the time of last renewal… and before then, well Hostmonster was nice a cheap…. 🙂

Part of my issue with finding a useful host was the bulls**t review sites out there that, lets not hold any punches here, are obviously sponsored by the hosting companies themselves. I read too many biased reviews and saw far too many completely different ‘top 10 hosting companies’ awards that I lost faith entirely and took to pot luck… that was my second mistake (the first was reading the review sites…)

I host a small number of small sites with low traffic requirements, my requirements are not out of the ordinary – Joomla hosting pretty much covers it. From whatever hosting I choose I expect an intuitive interface, good support and above to get what I was promised.

Now where was I… ah yes, initially I come across the GoDaddy 4GH Ultimate package; features included (at time of writing) an SSL certificate, static IP and the usual unlimited bandwidth/storage (including fair use policy rubbish and all that you get with every shared hosting provider). So I signed up and started to transfer my data across… that’s when the fun started.

GoDaddy 4GH

Firstly, the GoDaddy way of doing things appears to be to fragment the administration of hosting features into as many different control panels as possible… one for SSL, one for Email, one for Hosting… I’m not daft (at least I like to think I’m not!) but its a mess, period.

Next there’s no support for IMAP… huh?! This is an Ultimate hosting plan, they offer no better shared hosting… of course you can have IMAP if you upgrade your email hosting from the basic package supplied with the hosting deal (see where the separate control panels come in – email is essentially a seperate product from your web hosting).

The worst thing was however the level of additional customisation, and additional issues I had moving the site across. I kept getting the PHP ‘no input file specified’ when I was in the Joomla Administrator interface; this then stopped the entire site working for up to 20 minutes. Remember, this site worked just fine with the previous host. My encounter with GoDaddy support wasn’t inspirational either, I laid out all of the steps I had taken to try and resolve the problem myself using the .htaccess file, and yet was advised I should probably make some changes (all of which I had already advised I had done) to the .htaccess file… cunning!

I never got the issue resolved and had to rollback the migration; I’d been through every additional configuration I found on the GoDaddy forums, via their support and even trawling Google search results. I’m certainly not the first person to encounter this issue with Joomla (or Magento) running on GoDaddy shared hosting. Needless to say this was a nightmare.

Finally, there was the issue of performance. I’ll admit it, I was suckered in by the 4GH thing… the reality was that it was certainly no faster when the website I moved across was working, if anything it was slower. Experiential learning 0, stupidity 1 – lesson re-learnt on this occasion: when something sounds too good to be true it generally is.

iPage (aka Fat Cow)

So, here we are again… prices that look too good to be true, features that sound, well amazing for the money. The good news is that iPage support IMAP (at no additional cost!) and that they operate a single control panel (vDeck)… after GoDaddy this was a revelation. vDeck is not as intuitive is cPanel, but unless you’re particular about your control panels I think you’d get over it quickly enough.

The bad news came after I restored a site; no InnoDB support. What on earth is InnoDB you ask? Well I found myself asking just that very question. For a number of the sites I have built I use Rocket Theme extensions and Themes, some of which (RokGallery) require InnoDB. I didn’t fancy redesigning or rebuilding these sites with new templates and extensions, so iPage was gone.

In their defence the support response I got was almost instant, I liked the administration interface and loved the option to use the Akamai CDN for free, as well as the Site Lock subscription being part of the hosting package…. had they supported InnoDB that is where this site would be hosted today.

Bluehost (AKA Hostmonster)

So where did I end up (or will I end up)… Bluehost, which is one and the same as Hostmonster, only instead of paying $6.95 /month I’ll pay $3.95 for exactly the same service, on exactly the same servers, in exactly the same datacenters supported by exactly the same people. No revolutionary 4GH technology, or indeed ‘green power’ but it will work, and will continue to work as it has done for the last 4 years without issue… YMMV.

Lets face it people, the worlds economy is in a mess and money matters…. #rantover.

]]>
/site-news/general-site-news/hosting-nightmare/feed/ 0
Quick Update! /site-news/general-site-news/quick-update/ /site-news/general-site-news/quick-update/#respond Wed, 28 May 2008 21:06:50 +0000 http://wp.cb-net.co.uk/2008/05/28/quick-update/ After a recent bout of Citrix problems there are some new troubleshooting tips and reccomendations which may suit your environment.

The VBScript section is also constantly being updated with new, automated management tasks that should make your life easier! 

Take a look over here

]]>
/site-news/general-site-news/quick-update/feed/ 0
Welcome….. /site-news/general-site-news/welcome/ /site-news/general-site-news/welcome/#respond Wed, 28 May 2008 19:42:43 +0000 http://wp.cb-net.co.uk/2008/05/28/welcome/ Welcome to cb-net.co.uk! Your source for Microsoft, Citrix and Network administration, configuration and deployment documentation ‘from the field.’

Feel free to browse the categories above, or view the most recent additions from the menu on your left. Be sure to check back soon as new administrative scripts, tips and articles are frequently added

All documentation can be downloaded in PDF format using the PDF icon at the top-right of each article. Printer-friendly versions of each document are also available using the printer icon at the top-right of your chosen article.

 

NEW 27/09/2009: If you are looking for something specific try out the new search functionality here.

]]>
/site-news/general-site-news/welcome/feed/ 0