How to enable Cloudflare with Railgun

A tutorial that will guide you about how to enable CloudFlare with Railgun for your website.

Cloudflare is a CDN that allows to enhance your website performance, speed and latency with the help of their distributed network across the globe!

Cloudflare offers a premium feature called as Railgun which helps improving the website load times, especially for dynamic websites such as WordPress devloped websites, Drupal, Joomla etc.

Railgun ensures that the connection between your origin server and the Cloudflare network is as fast as possible. It is a premium plugin from Cloudflare which is available as a paid feature. However, we at WebHostUK, being an exclusive Cloudflare partner, offer Railgun for free for websites hosted on our server.

Below tutorial will explain you how to enable Cloudflare with Railgun on our servers.


  • Once your order is processed and your account is enabled, you will gain cpanel access to your account, where Cloudflare tool is available under “Software” section as visible in below screenshot:

  • Click on Cloudflare and it will then redirect you to Cloudflare setup wizard

  • You can use any of your existing Cloudflare account or create a new one. If you already have an account with Cloudflare, then please make sure that the domain (for which you are intending to add Railgun) is not existing in your Cloudflare account. If it is so, kindly delete it from your Cloudflare.com portal login.

  • To integrate Cloudflare, you have two options:

i. Partial setup also known as CNAME setup of website with Cloudflare : In this setup, your domain will use our nameservers and the CNAME of “www” prefix of your domain will be resolving to Cloudflare alias domain name.

Pro’s of CNAME Cloudflare setup : DNS zones are configured on our server which means, you do not need to do any manual DNS changes for your domain or its MX records or subdomains. These DNS records are automatically configured in DNS zones on our servers.

Con’s of CNAME Cloudflare setup : Since only “www” prefix is configured with Cloudflare alias hostname, Cloudflare with Railgun for the respective website will only work if domain is accessed with www prefix. If the website is not accessed with www prefix, Railgun will not work. So you will have to force redirect your website to its www prefix using rules in .htaccess


ii. CloudFlare DNS Managed setup or full setup : In Cloudflare DNS managed setup, your domain will use Cloudflare nameservers which means all host records including “A”, “MX”, “NS”, “SPF”, “DKIM” etc are all hosted on Cloudflare servers. Cloudflare will control DNS for your domain and we no longer have any DNS control for your websites or its subdomains.

Pro’s of Cloudflare DNS managed setup: Cloudflare with Railgun will work for domain with or without “www” prefix. This eliminates the need of any such redirect of website from non-www url to www url

Con’s of Cloudflare DNS managed setup: Since Cloudflare will manage your DNS, you will need to manually add MX, SPF or DKIM records in Cloudflare DNS portal. Whenever you create any subdomain, its entry will also need to be manually added in Cloudflare DNS portal.


  • Once you have enabled Cloudflare for your domain using any of “cname or cloudflare dns managed setup” as explained above, you will now need to request for enabling Railgun for your domain. In order to request enabling “Railgun” for your domain, you will need to submit a request at : https://www.webhostuk.co.uk/railgun-request.php

Your submitted request will raise a support ticket under your account, and our 24/7 support team will then enable Railgun for your requested domain and update you via your support ticket.

How to check if Cloudflare with Railgun is working for your website?

To check if cloudflare with Railgun is working properly for your website, you need to take help of an extension plugin which is available for Google Chrome Browsesr : https://chrome.google.com/webstore/detail/claire/fgbpcgddpmjmamlibbaobboigaijnmkl

Cloudflare if sucessfully enabled for your website and when accessed in Chrome, will show “red” dot as seen in below image

4020 : INVALID : Information received from an Invalid IP address.

Error number: 4020Error message: 4020 : INVALID : Information received from an Invalid IP address.

Explanation:  If your website is integrated with Sage Pay using either the Server or Direct method we must have a valid IP address from your platform or web hosting company in order to accept transactions.

The 4020 error message indicates that the transactional post that is coming from your site/hosting company is not being made using the valid IP addresses that you have entered into your Sage Pay account – via MySagePay.

All transactions that are posted from your website/server MUST be sent via one of the IP addresses that you have provided to Sage Pay. If your IP address is not entered within MySagePay, or is coming from a dynamic IP range then you will always encounter this error.

Solution:  The 4020 error message is an easy fix, the first thing you will need to do to prevent this error is obtain the IP address that is being used to post the information through to Sage Pay.

You are able to locate the IP address that you are using by –

  • Process a transaction using the Sage Pay Simulator – you can then obtain the IP address that is being used for the transaction.
  • Contact your Server administrator – if your Server is being hosted internally – they will then be able to provide you with the IP directly.
  • Contact your Hosting Company – if your site is being externally hosted by a 3rd party – they will be able to provide you with the IP directly.
  • Perform a “Ping” test – open your start menu, type “CMD”, this will then load up the DOS screen where you can then type “PING” followed by the URL you are trying to reach – your own website – this will then provide you with the IP address of the site that is making the post to Sage Pay.

Once you have the IP address you will then be able to enter this into your MySagePay admin account, to do this see our Adding IP article here. 

https://www.sagepay.co.uk/support/error-codes/4020-invalid-information-received-invalid-ip-address

How to Speed Up Magento Site Performance

Speed up Magento
Speed up Magento

Magento is one of the most widely used eCommerce platforms today that people to choose to grown their online business. In this post, we will discuss tips on how to speed up Magento performance to ensure you don’t lose any sales due to high abandonment rate or an unsatisfying user experience.

Magento’s intuitive administration interface features powerful marketing tools, a catalog-management engine and is SEO optimized to give merchants the power to create sites that provide an unrivaled and rich online shopping experience for their customers, tailored to their unique business needs.

When it comes to choosing an eCommerce CMS, you could go with WooCommerce which is an extension of WordPress, Shopify, Volusion, and a number of other ones.

Lot of businesses choose Magento is because it is a very robust platform with a high level of functionality and customizability, it is highly scalable, meaning there would be no need to change to a different platform later on as you scale up.

Enable Magento caching

This is of course the first step in optimization: Enable all the available caches in the Magento Admin Panel. When all other settings are in place and the site is ready to go live, navigate to System → Cache Management. Select everything and then under the drop-down select Enable and click Submit.

Latest Version

It is very important that you are always running the latest version of Magento as updates generally contain bug fixes and performance improvements. There are three main steps when it comes to upgrading a Magento installation.

1. Install a fresh version the Magento file tree
2. Run the installer from the file tree on top of the outdated database
3. Move over themes and custom extensions from the old version to the current version.

Magento upgrade is a little more work as compare WooCommerce or Shopify upgrade, but Customer Paradigm has a good in-depth tutorial on how to fully upgrade Magento.

Content Delivery Network

Implementing a CDN with Magento is one of the easiest ways to instantly see decreased load times, By doing  this you can ensure you are serving your product images, javascript, CSS from multiple locations around the globe so they are delivered faster to your clients.

Magento and Magento 2 CDN Integration with KeyCDN is very simple. Both can be setup with HTTP and HTTPS configurations.

Setting Up a Flat Catalog

You probably know that Magento uses EAV database structure for categories, products. In some cases this solution is not the best or fastest. Enabling the flat catalog for categories and products merges product data into one table, thereby improving performance by responding to MySQL queries faster.

On the Admin menu, select System → Configuration. Then in the panel on the left under Catalog, select Catalog

Under Frontend change Use Flat Catalog Category and Use Flat Catalog Product to Yes.

When complete, click the Save Config button.

Clear the cache. The recommended way to do this is to delete everything from the /var/cache directory. You can also do it by navigating to System → Cache Management and clicking on Flush Cache Storage which is equivalent to deleting all the cache.

Optimize Images

Very few stores are optimizing images which is quite important considering that images change on every page load. Optimizing your product images can dramatically increase the speed of your pages as this decreases their download times.

You can compress them before uploading them using a tool like PhotoShop or there are a number of extensions you can use to auto-optimize them.

 

GTMetrix also has a Magento extension called GTspeed. It includes image optimization as well as CSS/JS concatenation and minification. Take a look at the difference on a stock Magento install. After installing the plugin, take a look at the difference on a stock Magento install:

How to Install Magento 2.1.3 on PHP 7.1.0

magento on php 7
magento on php 7

Here is how to install and run the latest Magento 2.1.3 on the latest PHP 7.1.0

Disclaimer: although this hack is tested on the default Magento 2.1.3 sample data installation use this with caution for production sites. always test test test!

Patch installation files

Magento 2.1.3 checks php version and refuses to install with php 7.1.0. Let’s bypass it.

Open up setup/src/Magento/Setup/Model/PhpRedinessCheck.php and change line 79

from:

$normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion(PHP_VERSION);

to:

$normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion('7.0.2');
Suppress mcrypt warnings

Edit vendor/magento/framework/Encryption/Crypt.php and prefix all mcrypt/mdecrypt functions with @ :

@mdecrypt_generic

here is a diff file:

54c54
< $this->_handle = @mcrypt_module_open($cipher, ”, $mode, ”);

> $this->_handle = mcrypt_module_open($cipher, ”, $mode, ”);
56c56
< $maxKeySize = @mcrypt_enc_get_key_size($this->_handle);

> $maxKeySize = mcrypt_enc_get_key_size($this->_handle);
62c62
< $initVectorSize = @mcrypt_enc_get_iv_size($this->_handle);

> $initVectorSize = mcrypt_enc_get_iv_size($this->_handle);
80c80
< @mcrypt_module_close($this->_handle);

> mcrypt_module_close($this->_handle);
83c83
< @mcrypt_generic_init($this->_handle, $key, $initVector);

> mcrypt_generic_init($this->_handle, $key, $initVector);
93,94c93,94
< @mcrypt_generic_deinit($this->_handle);
< @mcrypt_module_close($this->_handle);

> mcrypt_generic_deinit($this->_handle);
> mcrypt_module_close($this->_handle);
138c138
< return @mcrypt_generic($this->_handle, $data);

> return mcrypt_generic($this->_handle, $data);
152c152
< $data = @mdecrypt_generic($this->_handle, $data);

> $data = mdecrypt_generic($this->_handle, $data);

rm -rf var/cache/*
rm -rf var/generation/*

Best Web Hosting New Year 2014 Offer: Huge Discounts and Chance to win Exotic Gadget

Best UK Web Hosting New Year 2014 Offer
Best UK Web Hosting New Year 2014 Offer

Launched in the year 2004, WebHostUK is one of the leading UK Web Hosting providers that offers most secured, reliable and affordable web hosting plans.

This New Year, WebHostUK is offering up to 50% Recurring Discount on its web hosting plans for the customers looking forward to get their websites live in the year 2014. Customers can choose web hosting plan according to their requirement without worrying about price as this offer features discounts on all web hosting categories.

Check out the Discounts available on Different Web hosting Categories:

1) Linux Shared Hosting & Windows Shared Hosting: 50% Discount Coupon Code – 50NY2014
2) Linux Reseller Hosting & Windows Reseller Hosting: 50% Discount Coupon Code – 50 NY2014
3) Ecommerce Shared Hosting: 25% Discount Coupon Code – 25 NY2014
4) Linux VPS Hosting & Windows VPS hosting: 20% Discount Coupon Code- 20 NY2014
5) Linux Dedicated Servers & Windows Dedicated Servers: 20% Discount Coupon Code- 20 NY2014
6) Cloud VPS Hosting: 50% Discount on First Month Payment Coupon Code – 50CLOUD

A lucky winner will be chosen through RANDOM.ORG who can choose any gadget from iPhone5s, Galaxy S4, Google Nexus5, PlayStation4, Xbox One, Dell Laptop & iPad Air. We also have First and Second Runner up price that gets free Shared, Reseller or VPS hosting free for life! This offer is valid till January 15th 2014 and the winner will be announced on January 22nd 2014 on our blog, forum, Facebook and Twitter.

Terms and Conditions of the Offer:

1) Customer placing new order is only eligible for the lucky draw.
2) Customer should be UK or US Resident to be eligible for the lucky draw.
3) Customer should place order using Coupon code to be eligible for the lucky draw.

Shared Hosting starting from just £14.99 per year – Order Now
Reseller Hosting starting from just £9.99 per month – Order Now
E-commerce Hosting starting from just £99.99 per year – Order Now
VPS Hosting starting from just £39.00 per month – Order Now
Cloud Hosting starting from just £25.99 per month – Order Now
Dedicated Server starting from just £94.00 per month – Order Now

Features available with WebHostUK Hosting Plans:

  • 24x7x365 days instant support through live chat and helpdesk.
  • Free Data Transfer
  •  Free RVSkin for WHM/Cpanel
  • Softaculous integrated with Cpanel
  • Free Attracta SEO Tools integrated with cPanel
  • Free WHMCS Billing software (On Selected Reseller Plans)
  • Free Dedicated IPs (On E-commerce, VPS, Dedicated Servers & Selected Reseller Plans)
  • Free Enom Reseller account (Reseller Plans)
  • Free SSL Certificate (On E-commerce and Selected Reseller Plans)
  • Private Nameservers
  • Price-Freeze
  • 99.9% Uptime Guarantee
  • No Contracts
  • 30 Day Money-Back Guarantee (Applicable on Shared hosting and Reseller Hosting)

The New Year Offer is valid till January 15th 2014 only! Don’t wait up! Order now, take the benefit of this offer and win a chance to get exotic gadget of your choice! Wish you a very Happy and a Prosperous New Year!