How to remove query strings from static resources in wordpress

I ran some tests in Pindgom & found that load times could be improved. The fix was to remove query strings from static resources. Here is a screenshot before optimization:

before remove query strings from static resources - pingdom

I needed to improve the load time and the perf. grade score a bit more to improve SEO ratings.

There are many websites where you can perform a speed test of your website. I would recommend either of the following:

  1. Pingdom: http://tools.pingdom.com
  2. GTmetrix: http://gtmetrix.com

The above websites also provide a ‘Waterfall layout’ which displays the sequential order in which the elements are loaded(starting from the DNS query, the wait times, load times etc). I used pingdom instead of Gtmetrix as I was able to select the server location from which the test was being conducted which made it more flexible. Now, lets gets started!

[Disclaimer: Only attempt this if you know what you are doing and make sure you have a full backup of your website just incase something goes wrong.]

To remove query strings from static resources:

Add the following to your wordpress theme’s functions.php file and save it.

/*** Remove Query String from Static Resources ***/
function remove_cssjs_ver( $src ) {
 if( strpos( $src, '?ver=' ) )
 $src = remove_query_arg( 'ver', $src );
 return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

After adding the above code, I ran a speed test in pingdom to check if there was any performance improvement. As expected, the perf. grade score increased from 78/100 to 84/100 and the load time reduced to 286ms from 975ms. Yaay!!

after- remove query strings from static resources - pingdom

Also, note that if in the future you update your wordpress theme, the functions.php may also be updated/replaced. So you may need to verify and re-do this step again to make sure its persistent after the theme update.

There are plugins that do the same procedure to make things easier, but I prefer the manual way as installing a lot of plugins can slow down your website.

Have you optimized your wordpress site? Feel free to leave a comment below. Do subscribe for future updates. Happy Blogging!

[Source: Technumero, WordPress forums ]

How to install CentOS 6.7 minimal on virtualbox + Screenshots

This is a guide on how to install CentOS 6.7 minimal on virtualbox (text mode) in Windows 8.1 including screenshots. Hope this helps!

Requirements:

  1. CentOS 6.7 32-bit ISO : Download Link (~354 MB) {Note: Download the minimal version.}
  2. VirtualBox : Download Link (~114 MB)
  3. Atleast 8GB of free space
  4. CPU that supports Virtualization

Installation Procedure:

First, thing we need to  do is to set up Virtual Box. Go ahead download and install Virtual Box (the download link is given above in the requirements).

Open VirtualBox and click on “New“.

Click on "New" to create VM

Type in “Name” as anything you like. I have named mine as “CentOS 6.7 minimal (32-bit)“. Make sure that the “Type” is “Linux” and the “Version” is “Redhat (32-bit)” as we have downloaded the 32-bit version of CentOS. Then click on “Next“.

select type as "Linux" and Version as "Red Hat (32-bit)"

Now, select the amount of memory /RAM you need to allocate to your CentOS virtual machine. For this installation, allocate 512 MB of RAM for text mode installation and then click on “Next“.

select 512mb RAM

You can now click on “Create a virtual hard disk now” and then click “Create“.

Click "Create a virtual hard disk now"

Now, select the first option “VDI (VirtualBox Disk Image)” and then click on “Next“.

Select VDI

Select “Dynamically Allocated” and then click on “Next“.

Select "Dynamically allocated"

You can now select the size of the hard disk you need to allocate for your CentOS virtual machine and then click on “Create“. I would suggest a minimum of “8 GB”.

[Optional: If you need to change where the hard disk file is to be saved, you can click on the folder icon in the green box and change it accordingly.]

Provide atlease 8gb hard disk space

Now, click on the CentOS virtual machine that you created and then click on “Start” as shown below.

Select CentOS VM and click Start

We need to provide the CentOS ISO file we downloaded earlier to Virtualbox for the VM to boot from the ISO image. You can do this by clicking on the folder icon as shown below and then selecting the CentOS ISO file and then clicking on “Open“.

Click on folder icon

Select ISO file and click Open

Once, you have selected the ISO file, you can click on “Start“.

click start

The virtual machine will now boot from the provided CentOS ISO image and you will be presented with the boot menu as shown below. Select the first option “Install or upgrade and existing system” and hit Enter in your keyboard.

Select "Install or upgrade and existing system"

 

booting progress

[Note: In this mode (i.e the text mode), you can use the arrow keys in your keyboard or the TAB key in your keyboard to move through different options and Enter to confirm selection.]

Now, use your arrow key/ TAB key to select option “Skip” and hit ENTER in your keyboard.

select "Skip" and hit Enter

Installation starting

You will see a message “Welcome to CentOS!” with an “OK” button. Hit Enter in your keyboard.

hit Enter

Select the language as “English” and hit Enter.

Select "English" and hit Enter

Select the keyboard layout as “us” and hit Enter.

select us keyboard

Now, you will get a Warning message “Error processing drive“. Select the last option “Re-initialize all” using arrow/ TAB keys and hit Enter.

Select "Re-initialize all" and hit Enter

Now, make sure you select the right time zone. You can use the arrow keys to cycle down each entry or you can use the Page UP/ Page Down key in your keyboard to cycle through the list quickly. After you have selected the Time Zone, select “OK” and hit Enter in your keyboard.

Select "Time Zone"

Now you need to create a root password for your CentOS virtual machine. Finally select “OK” and hit Enter.

Enter password for root account

Select the first option “Use entire drive“, then select “OK” and hit Enter in your keyboard.

Select "Use entire drive"

Hit Enter

Select “Write changes to disk” and hit Enter.

Select "Write changes to disk"

This will now install all the required packages. It would take a few minutes depending on the speed of your computer.

Installation progress

Once installation is complete you will be prompted with a “Reboot” button. Hit Enter for the CentOS virtual machine to restart.

Select "Reboot"

centos virtual machine rebooting

You should see the CentOS booting progress as shown below.centos boot screen

You will now be prompted with the login screen.

centos login prompt

Now, type the username as “root” and hit ENTER in your keyboard. Then type in the root password that you created during installation and hit Enter. Upon successful login, you will see the bash prompt with # symbol at the end.

succesfully logged in as root

And Voila! You have successfully installed CentOS 6.7 minimal in VirtualBox using text based installation method. I will be creating another post on how to configure the network manually in CentOS 6.7 using the terminal.

If you have any queries regarding this installation, feel free to leave a comment below and will get back to you. Do subscribe to my blog get future updates! 🙂

Double quotes not working in Linux terminal – [Solution]

I encountered an issue in my CentOS VM where whenever I type the  (single quote) or the  (double quotes) in the terminal, they don’t get displayed. I did the following to fix the issue:

In your terminal window, type the following:

# setxkbmap -layout us

You should now be able to use single, double quotes or tilde symbols in your terminal.

The above command simply changes the keyboard layout to English (US) and this is under the assumption that you are actually using a English (US) keyboard in your PC.

[Note: English (US) layout is different from English (US) International keyboard layout].

You can check the screenshot below for reference.

setxkbmap -layout us

Thanks and credits to this post that helped me resolve this issue.

Feel free to leave a comment in the comments section down below. Happy troubleshooting! Cheers!

how to import ova file into virtualbox + Screenshots

This is a guide on how to import an ova file into virtualbox with screenshots.

In Oracle virtualbox, click on “File” and then click on “Import Appliance“.

import ovi file into virtualbox

Then click on the “folder” icon as shown below:

select ovi file

Select the .ova file you need to import and then click on “Open“.

browse to ovi location

Click on “Next“:

ovi file selected, click next

importing

Now, you can configure the options, such as change the virtual machine’s name which is optional as show below:

change VM name if needed

You can also change the location of your virtual machine’s hard disk if needed by changing the location field.

change virtual machine's hard disk location if needed

Now, you can go ahead and start you VM.

VM created, select and then click start

Wohoo! You have successfully imported your ova file into virtualbox.

If this article helped you, do share this by clicking on the share buttons you see in this page. If you have any queries feel free to leave a comment below and I will get back to you! Happy Virtualization!

Source: Link

ifconfig does not show eth0 in centos 6 on virtualbox – Solution + Screenshots

After installing CentOS 6.x or importing a preinstalled VDI image (for example from osboxes.org) if your network is not working or if eth0 does not show up, then you can follow these steps to fix it:

Step 1Inspect ifconfig output

Run the following command:

ifconfig

ifconfig no eth0

As you can see it shows only the output for loopback interface lo.

To find all interface information and MAC for eth0, run the following command:

ifconfig -a

Now, take a note of the MAC Address that you see in your screen as you will need it soon.

eth0 mac address

Step 2: Manually configure eth0 and network settings:

Type the following in your terminal:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Change/edit the ifcfg-eth0 as the following, and make sure the HWADDR value is the MAC address that you took a note earlier.

DEVICE=eth0
HWADDR=08:00:27:87:09:6A
NM_CONTROLLED=NO
ONBOOT=YES
BOOTPROTO=dhcp

So, it will finally look something like picture attached below.

ifcfg-eth0 configuration fileTo edit your network file, type the following command:

vi /etc/sysconfig/network

Now, add the following line if its not already present to the file:

NETWORKING=yes

/etc/sysconfig/network file

Save the file and exit.

Step 3. Restart network service

service network restart

This should fix the issue and your eth0 interface should popup in no time as shown below.

service network restart no output fixed

You can also check the IP address information using ifconfig to check the assigned IP address.

ifconfig

eth0 ifconfig output solved

Hope this helps! If you found this article helpful, do share this article by clicking on the sharing icons you see in your screen.

Feel free to leave a comment below if need any further help and will get back to you as soon as possible. Subscribe for future updates!

Source: Link

How to install apache from source in Centos 6.7

This is a simple guide on how to configure Apache from source in Centos 6.7 + installing APR, APR-UTIL and PCRE to make it work.

Step 1. Install gcc:

Open up your terminal window and type the following command:

yum install gcc gcc-c++

Now, change to following directory:

cd /usr/src/

Step 2: Download and configure APR :

To download the APR file, use the below command:

wget http://a.mbbsindia.com//apr/apr-1.5.2.tar.gz

Now extract the downloaded file:

tar -zxvf apr-1.5.2.tar.gz

Change to the extracted folder and run the following commands to configure apr:

cd apr-1.5.2
./configure –prefix=/usr/src/apr
make
make install

Step 3. Download and configure apr-utils:

Change to following /usr/src/ directory:

cd /usr/src/

To download the APR-UTIL file, use the below command:

wget http://mirror.fibergrid.in/apache//apr/apr-util-1.5.4.tar.gz

To extract file, change to extracted folder and to configure apr, run the following commands:

tar -zxvf apr-util-1.5.4.tar.gz

cd apr-util-1.5.4
./configure –prefix=/usr/src/apr-util –with-apr=/usr/src/apr/
make
make install

Step 4. Download and config PCRE:

Change to /usr/src/ directory:

cd /usr/src/

To download pcre2-10.21.tar.gz type the following your terminal:

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.gz

To extract file, change to extracted folder and to configure pcre2-10.21, run the following commands:

tar -zxvf pcre2-10.21.tar.gz

cd pcre2-10.21
./configure –prefix=/usr/src/pcre2
make
make install

Step 5. Download Apache / httpd:

Now, change to following directory:

cd /usr/src/

To download httpd tar ball type the following your terminal:

wget http://a.mbbsindia.com//httpd/httpd-2.4.18.tar.gz

To extract file, change to extracted folder and to configure httpd, run the following commands:

tar -zxvf httpd-2.4.18.tar.gz

cd httpd-2.4.18
./configure –prefix=/usr/local/apache2 –with-apr=/usr/src/apr –with-apr-util=/usr/src/apr-util –with-pcre=/usr/src/pcre2/bin/pcre2-config
make
make install

Step 6. Start and test your apache server 

service httpd start
httpd -v

You can also open your browser and go to:

http://localhost/

And it should give you the Apache Welcome page.

And Voila! You have successfully configured apache from source. Hope this helps!

[DISCLAIMER: This guide is strictly for the purpose of learning how to configure apache from source for beginners. This should not to be used in a real production server as no security measures has been discussed or implemented in this tutorial.]

If you liked this article, do leave a comment below. You can also share this article by clicking on the social media buttons below. 

Source: ApacheTroubleshooting source: APR troubleshooting

Most powerful Ubuntu phone: Meizu PRO 5 Ubuntu Edition

The world’s most powerful Ubuntu phone “Meizu PRO 5 Ubuntu Edition” has just been launched with some serious hardware. Take a look at the specs below:

  • 8 core Exynos 7420 processor and MALI T760 GPU.
  • 32GB of internal memory.
  • 3GB LPDDR4 RAM.
  • 5.7 inch 1080p screen with a re-tuned delta cool color AMOLED screen.
  • Corning Gorilla Glass 3 with improved damage resistance and toughness.
  • 21.16 megapixel rear-facing camera with PDAF phase laser-assisted focusing and LARGAN 6P lenses for improved resolution.
  • 5 megapixel front-facing camera.
  • Hi-Fi Sound.
  • Slots for two micro-SIM cards.

meizu Pro 5 ubuntu phone picture
Image: Meizu Pro 5 Ubuntu Edition [Credits: Ubuntu.com]
This device as you all know is joint initiative of Canonical and Meizu and have had successful launches of Ubuntu phones in the past. The launch of the device will definitely conquer hearts of all Linux lovers (myself included).

The company states that the phone is running the latest code and is capable of providing a desktop experience (which basically allows you to connect your phone to a monitor and use it as a normal desktop). This phone weights about 168 grams with dimensions of 156.7x78x7.5 mm. Also, the Meizu Pro 5 ubuntu phone does not support MHL output. It does come with applications such as Instagram, Twitter, Telegram and Soundcloud.

The phone is available for pre-order during the Mobile Congress 2016 event.

What do I think of this?:

  • Dayyymmm!! I need me one of those!!!

If you are an Android or Apple user, would you switch to the Ubuntu phone? Feel free to leave a comment below!

Do share this article on Facebook, Twitter, Google+ by clicking on share buttons in this page. And don’t forget to subscribe to get latest updates! Stay Tuned! 🙂

Source: Ubuntu, Image Source & Credits: Ubuntu Phones

7 reasons NOT to buy the Freedom 251 mobile

Here are 7 reasons NOT to buy the Freedom 251 mobile now:

Reason 1:No SAR mentioned

It wont burn a hole in your wallet but will burn one in your pants. 

There is no mention of the SAR value anywhere in the website which is suspicious. According to the Indian law, every phone that is to be sold in India must have a SAR value less than 1.6W/kg.

[Note: If you need to see the specifications of the phone, you can find it here.]

Reason 2: Actual manufacturer logo hidden with whitener. You gotta be kidding me???

According to bgr, the device is actually manufactured from a company “Adcom” and the logo was essentially masked with Whitener ink(see picture below). I mean who does that before such a huge launch? Atleast they should have re-branded the device or changed the mobile shell casing.  I would love to meet the PR guy of Ringing bells in person someday and say “Hey, nice try douchebag“.

freedom-251-ripoff
Image Source: BGR.in (See below for credits)

 

Reason 3: No proper Wiki Page

Here is a screenshot that I took a few hours before the launch of the device on 18th Feb 2016:

Freedom 251 - Wikipedia page as on 18th feb 2016

Here another screenshot of the manufacturer Wiki page that I took on 18th Feb 2016 a few hours before launch.

Ringing Bells Private Limited - Wiki page

It sounds like the Ringing Bells is just a re-seller who basically has no idea what they are doing or this is an elaborate scheme to market as the cheapest phone.

Reason 4: Not accredited by ICA

The phone is not accredited by ICA (Indian Cellular Association) and so legally it cannot be sold in India.

Reason 5: Website lacks basic security and optimization

Here is one major security problem that will make you think twice about entering your personal information in their website:

  • The website uses Plain Text form of Authentication which basically means the data is send across your PC to their server in plain-text format. So, basically any hacker who has access to your network can easily sniff your username and password

I did a whois lookup on the domain freedom251.com and found it is registered on through registrar Bigrock.in and also it is hosted on Amazon EC2. For those who are not aware, websites such as www.quora.com run on Amazon cloud and have little or no downtime and handle traffic well. The best part is Amazon’s EC2 are well known for its strong network infrastructure and the fact that you can be easily upgraded to a larger instance depending on your website and traffic requirements. I wonder how the mobile manufacturer’s website was unable to handle the traffic and was down couple of times/had to shutdown service on the launch date itself.

freedom 251 domain lookup info

I really hope they did not choose the AWS free tier micro instance for hosting their website to handle such huge amount of traffic.

Reason 6: Long Shipping period

According to Ringing Bells, If you place the order for the mobile today, you will get it only after 4 months. Since most of you already know that its not a Ringing Bells product and its actually from another manufacturer Adcom, you should have already guessed the reason behind the 4 month waiting period. I believe that its one of two reasons:

  • Make customers place the order and accordingly import the Adcom mobiles from China and courier it to the customer (and obviously hide the Adcom branding with whitener before shipping).
  • Its possible that they were trying to adopt the marketing technique from Chinese manufacturer Xiaomi and failed miserably. The difference was that Xiaomi had the mobile shipped and stocked in India to be delivered without the long waiting period unlike the Freedom 251.

Reason 7: User Interface

Looking at the device user interface, it closely resembles Apple’s iOS. Matter of fact the device itself reminds me of my ancient Iphone 3Gs.

There are 1000s of twitter users already angry with the turn of events. What do u think about the turn of events? Do, leave a comment in the comments section below, I would love to hear from you.

Feel free to share this article in facebook, twitter, google+ by clicking on share buttons you see in this page. Do subscribe to get future updates! 🙂

Sources: bgr.in,

How to fix chrome update loop “Nearly up-to-date! Relaunch Google Chrome to finish updating. Relaunch”

This is a guide on how to fix chrome update loop message “Nearly up-to-date! Relaunch Google Chrome to finish updating. Relaunch

Current version: 49.0.2623.39 dev-m (64-bit)

To verify open chrome and check the version in “About” page and then check if you get the above message with a Relaunch button. Then, recheck your chrome version in “About” page and see if it gives the same message.

check chrome about

Relaunch Google Chrome to finish updating error

 

 

If its still giving you the error message “Nearly up-to-date! Relaunch Google Chrome to finish updating. Relaunch”, then you can follow these steps to resolve this issue:

[IMPORTANT: Please  backup all your chrome bookmarks and other chrome related data before attempting this troubleshooting just to be on the safe side.]

Step 1. Close all active chrome windows

Open task manger to check if there are any instance of chrome running.

If you are on Windows 8 / Windows 8.1 machine, Press CTRL+ALT+DEL together in your keyboard, and click  “Task Manager“.

Now, you will find chrome in the list, right click that and select “End Task” for any process that says “Google Chrome”.

end task for all chrome

 

Step 2. Delete old chrome’s executable and folder

Now, Browse to the following folder:
C:\Program Files (x86)\Google\Chrome\Application\

You will see two executable files there: chrome and new_chrome

file location C:\Program Files (x86)\Google\Chrome\Application\

Right click on chrome and select “Delete“.

delete chrome.exe

Now, rename executable file “new_chrome” to “chrome“. So after renaming it will look like this:

rename new_chrome to chrome

Now, Delete the folder with the older version number. In my case, I deleted the folder “49.0.2623.39“.

delete old chrome folder 49.0.2623.39

Step 3. Verify chrome version

Open up your chrome browser. Check the “About

check chrome about

 

chrome update error fixed

It should now display the message “Google Chrome is up to date.”

And Voila! You have successfully fixed the update issue.

If this article helped you, then support us by leaving a comment down below or by liking us on FacebookTwitterGoogle+ and  Tumbler.

Regards,
ΞXΤЯ3МΞ

Source: Link

How to setup Cloudflare CDN with Bigrock (manually) + Screenshots

This is a guide on how to setup Cloudflare CDN with BigRock (similar for Bluehost,Godaddy, Dreamhost, Hostgator) for your website or blog . You can follow the steps below:

Step 1. Create an account with Cloudflare:

Go to https://www.cloudflare.com and click on the “Signup” button.

 

cloudlare signup

Fill in your details, tick on “Agree” and then click on “Create Account“.

cloudflare create account

Step 2. Add your website

Now, in the text box below, type your website address and then click on “Scan DNS Records“as shown below.

cloudflare add site and scan dns

It will take a few moments for the scanning to complete.

 

cloudflare scanning dns records

Once, the scanning is complete, click on “Continue“.

 

cloudflare dns scanning complete

Now, click on “Continue” in the bottom corner:

cloudflare click continue

 

 

Step 3. Select Cloudflare Plan

Now, select the “Free Website” package as shown below and click on “Continue“.

 

select cloudflare free plan

Step 4. Get new name servers

Now, you will see the Cloudflare name servers as shown below. [This may vary for your website]

cloudflare name servers

As you see, for my website it is requesting to change the name server from

dns1.bigrock.in to linda.ns.cloudflare.com
dns2.bigrock.in to rob.ns.cloudflare.com

Also, also to remove the following nameservers:

dns3.bigrock.in 
dns4.bigrock.in 

[Note: The nameservers that you may see in your screen may be different.]

Step 4: Change your name servers to Cloudflare

Now, open up a new tab and login to your domain host panel (i.e. from where you bought your domain name from eg BigRock, Goddady, Hostgator, Bluehost etc). I have my domain from BigRock so I will be loggin in to my Bigrock account.

domain hosting bigrock login

Now, click on the domain you need to change the name servers to.

 

bigrock select domain

Now, click on “Name Servers” 

 

bigrock manage name servers

 

 

And you will see your default nameservers as shown below:

default bigrock name servers

Now, change your nameserver to the ones provided by cloudflare. In my case, after changing the nameserver, it will look like this:

 

cloudflare nameservers update

Now, click on “Update Name Servers“.

domain bigrock nameserver change success

Step 5: Verify in Cloudflare

Now, go back to your cloudflare tab and click on “Continue“.

cloudflare dns nameserver

It should show you show you a green banner with the status: “Active” as shown below.

 

cloudflare cdn active status[NOTE: If you the status does not show as “Active” then you can click on “Recheck Status” and it then should show that its “Active”]

[IMPORTANT: It would take about 24-48 hours for the DNS to get updated.]

And Voila! You have successfully configured Cloudflare CDN for your blog/website and should load faster.

Do check the  performance of your website after 24-48 hours and let me know in the comments sections below if there was any speed improvement.

If this article helped you, then support us by liking us  us on FacebookTwitterGoogle+ and  Tumbler. 🙂

Regards,
ΞXΤЯ3МΞ