Showing posts with label Hire Wordpress Programmer. Show all posts
Showing posts with label Hire Wordpress Programmer. Show all posts

Wednesday, 26 October 2016

5 Steps To Optimize Your WordPress Website


WordPress is the first choice of CMS by millions of developers around the world. The major reason behind its reputation is its unmatched themes, templates, extensions and many other unique features. Creating a website over WordPress is quite simple. A well-designed website, featuring crisp and informative content and great functionality to the users keeps the readers engaged.

Although WordPress web development being such a great tool, many people mess with it and damage the reputation of the website. Sometimes, the website is loaded with useless pop-ups, irrelevant content or even the site is less responsive. To avoid getting the website lost in the crowd, you can hire a professional WordPress developer or take some measures yourself.



Install Cache Plugin(s)

In the digital world, the website which has the minimum loading time and is most responsive is the ultimate winner. And one of the sure shot ways to do it is to add some cache plugins to your WordPress website. When a cache plugin is enabled, the visitors of the website access the cached versions of the main website.

This helps in reduction of usage of PHP requests, access requests for static resources and heavily decreases MySQL database access. For this, you can hire WordPress developer or if you have the knowledge, you can do it by yourself. As soon as you install a cache plugin, you can see a significant boost in the responsive behavior of the website. Some of the best cache plugins are
  • WP Super Cache
  • W3 Total Cache
  • Cache Enabler
  • Zen Cache
  • WP Rocket

Upgrade Your Database


An optimized database is highly beneficial for WordPress website, which is a database drive software. Database of a WordPress website can be optimized from the “PHPMyAdmin” dropdown menu.

The other, and simpler way to do it is by installing database optimizing plugins. These plugins delete the spam data, automatically saved drafts, trashed posts and other things that pile and slow down the website. Some of the database optimizing plugins are
  • WP DBManager
  • WP Optimize
  • Optimize DB
  • WP Clean Up
  • P3

Select A Good WordPress Web Host

You can only start optimizing the site once you are assured that it is not the host services that are slowing it down. Many hosts put hundreds of websites to be hosted on a single shared server, killing the responsiveness of the website.

Look out for the hosting services who value your website and provide a better speed. There are many hosting services that specialize in WordPress web hosting. You can also consider managed web hosting services.

Install Gzip Compressor

It is always a better solution to present the website to your users in a compressed version. These are smaller in size, and loads a lot faster. You can enable this compressor directly from the control panel or using various plugins (try W3 Total Cache).

Put Off Pingbacks And Trackbacks
Trackbacks and Pingbacks are absolutely unnecessary and reduce the speed of the website. When a visitor comes to your website, a trackback is created. This consumes the database and utilizes the web server, ultimately slowing down the entire website. Turn off these features from the discussion settings to boost the overall speed of the website.

5 Steps To Optimize Your WordPress Website


WordPress is the first choice of CMS by millions of developers around the world. The major reason behind its reputation is its unmatched themes, templates, extensions and many other unique features. Creating a website over WordPress is quite simple. A well-designed website, featuring crisp and informative content and great functionality to the users keeps the readers engaged.

Although WordPress web development being such a great tool, many people mess with it and damage the reputation of the website. Sometimes, the website is loaded with useless pop-ups, irrelevant content or even the site is less responsive. To avoid getting the website lost in the crowd, you can hire a professional WordPress developer or take some measures yourself.



Install Cache Plugin(s)

In the digital world, the website which has the minimum loading time and is most responsive is the ultimate winner. And one of the sure shot ways to do it is to add some cache plugins to your WordPress website. When a cache plugin is enabled, the visitors of the website access the cached versions of the main website.

This helps in reduction of usage of PHP requests, access requests for static resources and heavily decreases MySQL database access. For this, you can hire WordPress developer or if you have the knowledge, you can do it by yourself. As soon as you install a cache plugin, you can see a significant boost in the responsive behavior of the website. Some of the best cache plugins are
  • WP Super Cache
  • W3 Total Cache
  • Cache Enabler
  • Zen Cache
  • WP Rocket

Upgrade Your Database


An optimized database is highly beneficial for WordPress website, which is a database drive software. Database of a WordPress website can be optimized from the “PHPMyAdmin” dropdown menu.

The other, and simpler way to do it is by installing database optimizing plugins. These plugins delete the spam data, automatically saved drafts, trashed posts and other things that pile and slow down the website. Some of the database optimizing plugins are
  • WP DBManager
  • WP Optimize
  • Optimize DB
  • WP Clean Up
  • P3

Select A Good WordPress Web Host

You can only start optimizing the site once you are assured that it is not the host services that are slowing it down. Many hosts put hundreds of websites to be hosted on a single shared server, killing the responsiveness of the website.

Look out for the hosting services who value your website and provide a better speed. There are many hosting services that specialize in WordPress web hosting. You can also consider managed web hosting services.

Install Gzip Compressor

It is always a better solution to present the website to your users in a compressed version. These are smaller in size, and loads a lot faster. You can enable this compressor directly from the control panel or using various plugins (try W3 Total Cache).

Put Off Pingbacks And Trackbacks

Trackbacks and Pingbacks are absolutely unnecessary and reduce the speed of the website. When a visitor comes to your website, a trackback is created. This consumes the database and utilizes the web server, ultimately slowing down the entire website. Turn off these features from the discussion settings to boost the overall speed of the website.

Friday, 14 October 2016

How to safeguard WP based site from hackers?


When it comes to maintaining a website, you might have to face plenty of technical and non-technical issues. It will be good that you overcome these problems before they destroy your site and takes away everything which you built. Most of the website owners usually worry about the security of their portal. Security issues like malware, virus and malicious codes, etc. are some of the most common problems faced by the owners.

WordPress is one of the most widely used CMS systems. It's an open-source technology which is easy to use and comes with plenty of plug-ins & dashboard settings. Keep this thing in mind, once your site is live on WP and it begins to attract more web traffic, it becomes more vulnerable to hack attempts. You can also look out for an experienced WordPress developer who will help you make your site secure. Most of the web hosting companies don't take the responsibility of defending your website so it completely depends on you how efficiently you handle the security of your site. 

Today WordPress powers almost 30% of the business websites which are live on the internet. This popularity had made this CMS one of the most favorite targets of hackers. As per the market surveys, it is said that around 30,000 WP sites are hacked annually. The main reason behind this is the negligence of the website owners. Most of the small & medium sized enterprises depend on their internal staff to maintain the security of their WP site even if it's not their area of expertise.

Given below are the few simple ways that will help you protect your WP based site from hackers:

Opt for a stronger & hard to configure password : Most of the website owners choose an easy to remember password such as a name, or number, etc. This type of passwords is very easy to decipher. When it comes to creating a password for the website, it will be good that you opt for minimum 8 to 16 characters long password which should contain numbers, lower case letters, capital letters, and special characters.

Always update your WP Version : Whenever WordPress releases a new update or security patch make sure you install it ASAP. Hackers quickly develop a program which can scan the vulnerabilities of the outdated versions of WordPress.

Deploy WP security plugins : The WP directory has plenty of security plugins that will keep your site safe and secure. Besides this, there are several third-party plugins available on the internet, but it will be good that you stick to those which are published in the official store as they are regularly updated and backed up by the team of experienced experts.

If you have sound technical knowledge, then you can yourself tweak the security settings of your site. In case you don't know much about these web systems then you can hire the team of experienced web developers who will help you accomplish this task. These web developers are fully aware of the ongoing security trends and the potential threats based on which they design the security system for your portal.

While looking out for a web developer, it will be good that you consider checking their past projects and clientele. You can also ask them about the type of security issues they have resolved till now as well as the strategies they deploy to overcome these problems. By taking all these factors into consideration, it will become easier for you to find the right developer for your web development and security project. You can also take help of the internet while searching for the suitable developer for your portal.

Thursday, 24 December 2015

Why Should You Hire a WordPress Developer and How?


Running your WordPress site in today's highly competitive virtual world is not an easy task, and requires you to put in a lot of efforts and time in coming up with a solution that can facilitate you a competitive advantage. So, despite having little knowledge about WordPress, there is a greater likelihood that you might fail to create a rock-solid web presence.

Especially if you are a non-tech savvy user, you cannot expect to make it big online merely by making a pre-built WP theme up and running. There are several other aspects that need your due consideration, during WP website development. But, what if you don't have the time or skills needed to get the job done? In that case, choosing to hire WordPress developer can help address your project needs efficiently. 

Below are a few crucial tips to help you understand how you can hire a credible and trusted WP developer:




1. Check out Developer's Proficiency in WordPress

Analyzing your developer's proficiency in WordPress is crucial in getting a result-driven solution. Remember that not all the developers have the same skill set. While a few may excel in some areas of WordPress development, but might fail in other areas (that match your project requirements).

So, be clear whether the developer you are about to hire can provide the exact services based on your preferences or not. Getting familiar with the basics of WordPress can help you in analyzing your service provider skills in a better manner.

2. Experience in WordPress Development/Customization

Ask how many years of experience your developer possesses in offering WordPress development or customization services. That is not to say that you shouldn't consider hiring a developer with less experience in WordPress projects, but selecting a highly experienced professional (with at least five years of experience), you can get assured outcome.

Also, make certain that your service provider has worked on the latest technologies essential for performing WordPress development.

3. Match Your Project Requirements With Developer's Portfolio


Today, almost every professional WordPress developer or a web development firm include a portfolio page to help users get an idea of what sort of work they can deliver to them. Check out your developer's portfolio as well, so as to make out if he/she has worked on any project that matches your project requirements.

4. Ask For Development Cost and Delivery Time


Your development budget can be an obstacle in hiring a service professional – that can deliver the quality of work you're expecting. But, you can still get first-class development services by choosing to outsource your project to an offshore web development company. But, be wise to select a company having a good reputation in the market.

Also, make sure that the company holds a good track record of delivering projects within discussed timelines.

Conclusion


Taking up an experienced WordPress developer services can help you address all your specific project requirements in the most effective and efficient manner possible. Reading the points above will further help you in finding a reliable development partner for your project.


Friday, 30 October 2015

10 Reasons Why You Should Use WordPress for Your Website



Unarguably one of the best CMS platforms in the world; WordPress is the ideal platform for business websites. Many people ask why businesses should use WordPress, isn't it a blog platform for bloggers? Yes, WordPress is used by hundreds of thousands of bloggers across the world but it's also the most advanced and well-equipped Content Management System that powers million of regular websites. Nearly 50% of the world's website that use any sort of CMS use WordPress as their CMS system. 
 
 
 
If you're having second thoughts about whether to choose WordPress, Joomla, Drupal, Adobe CQ; here are the 10 reason why you should be using WordPress:

#1. It's Easy to Use


It wasn't long before when you needed to add something to the website you had to call your web designer to do it. If you needed to add something or edit some content you, would have to go to your web designers and pay them to make the change. Today, staying up to dated means whether you stay in business or not, so websites are constantly updating pictures, adding more content, writing blogs to reach as many as possible and more importantly you save money on making changes to the website. This is where WordPress has the advantage over its rivals, the ease of use. Really, anyone can do it. But I prefer to hire a WP developer in the initial stage as they make theme more user friendly for the users.

#2. It's Free



Whether you've started blogging or started your business website; WordPress is absolutely free and you get 3 GB of storage in the free package, you can upgrade to Premium or Business depending on your need for $99 and $299 per year respectively. In business package you get unlimited storage, custom domain, advance customization, 50+ premium themes to choose from, live chat support, and Google analytics.

#3. Flexibility



It's an all-rounder for sure, and that's what you get with WordPress. Apart from the flexibility of adding different functionality, it can be used for adding portfolio site, or run ecommerce website, it works for almost everything with the ability to schedule the post.

#4. SEO Friendly


Google loves WordPress, so do we. In fact in the year 2009 Google's Engineer Matt Cutt endorsed WordPress in 2009 during Wordcamp and his own blog is also powered by WordPress. Not only that, it optimizes the content fast, title tags and headings, permalinks, and so many more features make it more SEO friendly.

#5. WordPress is constantly evolving



Yes, WordPress started out as a blog engine, but it has become so much more. With each new release new possibilities are added. And since it is "Open Source" there are thousands of developers writing plugins to extend its functionality.

#6.Customizable


What you get with WordPress is a huge array of free themes to choose from and you can pay $20 to choose from their premium themes. Because of the thousands of themes and plugins, you can make your website according to your need and preference, and plugins certainly are the best part about WordPress. The best part is most of them are free and easy to download and install. WordPress theme customization isn't a difficult task but will require some time to understand basic principle of web designing.

#7. Mobile Friendly



Well, that's one thing off your list to be worried about. Google has already made it clear about the important of websites being mobile-friendly, if not, it can affect their ranking on mobile search engines. WordPress is already a responsive platform and its themes support mobile optimization also.

#8. Multi-user Capability


There's a very good chance that there are a number of people working on your business website to keep the site updated and running. WordPress understands that and has made it easier by assigning different roles to different individuals, here's that:

  •     Super Admin – somebody with access to the site network administration features and all other features.
  •     Administrator – somebody who has access to all the administration features within a single site.
  •     Editor – somebody who can publish and manage posts including the posts of other users.
  •     Author – somebody who can publish and manage their own posts.
  •     Contributor – somebody who can write and manage their own posts but cannot publish them.
  •     Subscriber – somebody who can only manage their profile.

#9.Saves Money


Apart from being free to download and install, it's an open source CMS which means you don't need to hire a professional to look after bugs and issues. WordPress does that already.

#10.Support


That's one more thing you get with WordPress is a lot of support, If you find yourself stuck somewhere, visit the WordPress forum and you can post your question there.

Wrap Up

Well, there are definately more than 10 reason why would use WordPress for your website. But it's ease of use and adding functionality to it with ease, makes life so much easier for non-technical people.

Thursday, 17 September 2015

How to Create a Strong Verification for your Maintainable WP Meta boxes?

In order to give strength to its hook system, WordPress leverages event-driven pattern for designs. Though, we know that the design patterns are certainly dependent on each other , thus it is highly unlikely to recognize a design pattern. This is what which makes WordPress flexible.

Apart from achieving exclusiveness, other thing which WordPress developers look for is to create a code which is easily maintainable. As with the advancement of technology and enhancement in the features the codebase of any web app tends to grow more complex. Thus, with passing time it becomes difficult to preserve the clarity and maintainability of the code.

This is equally applicable on WordPress, be it a plugin, an extension, themes or any other project type. The thing which is important is to write a maintainable code.

That's it!
No! certainly not!

This is where developers go wrong, as they make sure that they have followed all the steps to a write maintainable code. Let's for instance they apply meta box, apply options and also apply tabbed navigation in the WordPress dashboard, but they forget to check whether the code they have written works for real or not.

In this blog we will go to the server side in order to apply code which can verify that whether the user has the authority to save the meta data or not .


How to verify that the permissions are granted?

You need to incorporate a security check during the serialization process so as to check whether the user has the ability to save post meta data and to publish. To do this we can use nounce value so as to implement this. This is a number which is used once in order to protect URLs from the scope malicious users.

1. How to add a Nounce?

To add a nounce in the meta boxes, you need to implement the functionality in the markup which will render the post template. For this you need to load admin/views/authors-quick-tab.php and then after you need to update the template so that it contains wp_nounce _field.


<div id="authors-quick-tab">

<h2 class="nav-tab-wrapper current">
<a class="nav-tab nav-tab-active" href="javascript:;">Tab 1</a>
<a class="nav-tab" href="javascript:;">Tab 2</a>
<a class="nav-tab" href="javascript:;">Tab 3</a>
</h2>

<?php
// add tabbed content
include_once( 'tabs/tab1.php' );
include_once( 'tabs/tab2.php' );
include_once( 'tabs/tab3.php' );
// Add a nonce field
wp_nonce_field( 'authors_quick_tabs_save', 'authors_quick_tabs_nonce' );
?>

</div>



The code written above has introduced a nonce which has the functionality for saving the authors quick tabs (which we've named authors_quick_tabs_nonce) . This was also linked with a value which is figured out by authors_quick_tabs. This won't load on the very first go when you will load your web app on browser, as these values are displayed in a hidden field.

Those people who are intrigued can launch a suitable bowser's development tool in order to check the meta box, and you would get something like this and of course with a different value of nonce.

<input type="hidden" id="authors_quick_tabs_nonce" name="authors_quick_tabs_nonce" value="q4df212f34">

2. Check the Nonce

To make sure that the permissions of saving the post assigned to the user is implemented properly or not, you need to check the following three things:

  • User must save the data on the 'post' post type
  • Users must actually have save permission
  • Post must be not automatically saved by WordPress

In order to incorporate the first two we can write a helper function and for checking the third one you can go for an intrinsic function. Primarily, you need to establish the hook as well as the functions that can make use of the helper functions and then you need to save your meta data. Now you need to add some piece of code in the Authors_Quick_Meta_Box which is given below.


<?php add_action( 'save_post', array( $this, 'save_post' ) ); ?>

The next step is to define the function. You can make use of the following code in which we have called two functions.

<?php
public function save_post( $post_id ) {

if ( ! $this->is_valid_fnc() || ! $this->user_save( $post_id, 'authors_quick_tabs_nonce', 'authors_quick_tabs_save' ) ) {
return;
}

}
?>



In the given code, it is written to run the save_post function when we call a save_post action. The function is written to verify that the saved post is not of the 'post' post type, and if the user do not has the authority to save then function should exit.

Definition of the function is must so as to make the logic work. Then we need to write the is_valid_fnc function as this function checks the $_POST array to ensure that the saved post type is a 'post'.


<?php
private function is_valid_fnc() {
/**
* check valid post type or not
*/
return ! empty( $_POST['post_type'] ) && 'post' == $_POST['post_type'];
}
?>


After this we need to add the user_save function, to make sure that the whether the saved post is automatically due to the WordPress or not. Further , if the user is saving the function so there should be a proper nounce value for that particular post.


<?php
private function user_save( $post_id, $nonce_action, $nonce_id ) {

$is_var_save = wp_is_post_autosave( $post_id );
$is_var_revision = wp_is_post_revision( $post_id );
$is_var_valid_nonce = ( isset( $_POST[ $nonce_action ] ) && wp_verify_nonce( $_POST[ $nonce_action ], $nonce_id ) );
// Return true or false.
return ! ( $is_var_save || $is_var_revision ) && $is_var_valid_nonce;

}
?>

Notice here that we're passing in the nonce_action and the nonce_id that we defined in the template in the very first step. We're also using wp_verify_nonce in conjunction with said information. This is how we can verify that the post that's being saved is done so by a user that has the proper access and permissions.
One thing you should note is that we are passing nonce_id and the nonce_action which were defined at the very beginning. Moreover, we will also use wp_verify_nonce conjunction in order to make sure that user who has proper authorities only can save the post.


Maintainable code is certainly an indispensable need of the modern development world. Thus, verifying it becomes a crucial task.
Feel free to share your queries!

Wednesday, 9 September 2015

Tips To Ensure That You Have An Adept VA For Your Web Development

If yours is an entrepreneurial business, Virtual Assistants (VAs) can help you boost your business. They can make your job amazingly simple by taking care of several tasks and thus, allowing you to concentrate over other essential that can lead to your enterprise growth. For instance, they can help manage calendars, an array of emails, handle campaigns to make sure that everything is working smoothly.

No doubt VAs can augment the website development process, but there are some crucial areas that must be dealt with utmost precision and thus, demand expert guidance. You can't simply hand over the sensitive controls to your VAs without getting yourself involved in them. However, by investing in some result-driven WordPress web development services, all the concerns related to web development will be managed by professionals. The adept WordPress developers can, thus, deliver a prolific web solution that can boost your business values.

Although, VAs are not that experienced to handle the crucial web development processes or maintain a business site, many business owners ask their VAs to put up a requisite website. The only apparent reason for this could be that this makes a cost effective way or enterprises want someone from their team to accomplish it.



For the folks who really want to put the responsibility of their website on their VA, it is essential to kick around and ensure that the chosen VA is appropriate for the job. Here I have enlisted a list of questions that can help you analyze the capabilities of your VAs and streamline your choice accordingly.
  • Are they capable enough to analyze and create a chart to represent insights of target market, so that your target audience will be clear. Thus, a site can be designed keeping them in mind.
  • Do they have branding and graphic design skills? Do they know the absolute way for optimizing images so that images can be instantly downloaded from any device?
  • Do they know about the latest web trends and have insights to choose the best suitable layout that can leverage your target market and business?
  • SEO is quite essential, Do they know how to achieve a search engine optimized website?
  • Do they possess any programming skill so that if something went wrong that can be handled and fixed appropriately? Other than the premium products, if any custom design is required, would they be able to customize your site without leaving the quality behind?
  • Do they know how to turn a site into a responsive site so that your business can reach myriads of devices with a flair.
  • If they are writing content for the web, do they aware of the ground rules of copywriting?
  • Do they belong to marketing field? If yes, what is their education and how many years of experience do they have in the field? Is it sufficient for your business.
  • Do they know about all kinds of feature and functions that can be integrated to deliver an enhanced website? Are they aware of a few plugins for particular categories?
  • Are they aware of other CMS platforms that can offer a superior experience than WordPress (like is Magento is better than WordPress if you want to develop an eCommerce website)?

If you get positive response for all the aforementioned questions, your chosen VA is ideal for developing your enterprise website. Otherwise, it is advisable to hire WordPress developer and reap the benefits of this blissful platform.

There are numerous web development companies that offer invaluable development services at competitive prices. Therefore, you can easily seek one that best suits your project needs and business objectives.

Thursday, 18 June 2015

Why WordPress is a great for Non-profit organizations ?

WordPress has recently celebrated its 12 birthday and has emerged as a leading content management system for websites and blogs. WordPress plugin development services plays a crucial role in maintaining the zest of WordPress alive by providing high performance plugins for extendable functionalities. There are a lot of organizations which have chosen most professional WordPress website development firm to build their websites in order to cater their audience in the best possible way. Being an open source software WordPress is widely used by a lot of non-profit and social organizations to make their mark in this open source world. Though there are a lot of content management systems present in today's world but WordPress is the most widely used CMS in the market preferred by this social service group and NGO's. Let's dig deeper!


WordPress provides quick service and being an open source software is free. You need no money to purchase its license, no money to upgrade the software and no other extra cost regarding commissions are required. It is estimated that organizations spend around $500 only while paying for the license and other stuff related to the content management system let alone the cost of hiring a WordPress developer. Furthermore, WordPress offers ample lot of template designs and themes with easy integration steps which helps the organizations to save the cost they invest to hire designers or web programmers.  Moreover, there are a lot of free themes specially tailored for non-profit organizations. Moreover, it offers quick installation and setup procedures which plays a crucial role in its success. This further helps you to establish your website on internet within a very short period of time. WordPress has some where or the other has played a crucial role in decreasing the time taken to build websites.

Perfect model for NGOs


As we are well aware of the fact that most of nor-profit or social service organizations function with the help of donations and thus have a revenue model for getting non-conventional income.  WordPress works as one of the best CMS for these sites as it allows very easy integration of Payment gateways, which accepts online transfers and other regular payment modes. There are numerous plugins such as PayPal, 2CO, Stripe and many other which fosters the payment model which these websites need. Everything is ready made and handy to use and all you need to do is to fill in the bank details of your organization and start the process. We further have plugins which allows these organizations to spread their work with ease.

Add extra features via Plugins


No CMS can provide all the features which you need in your website. Thus, it becomes necessary for you to use tools which allows a wide range of extendability. WordPress stands tall in offering this functionality as it allows simple integration of plugins which helps you to improve the credibility of your website. One can install various features such as  Statistics Tools ,Social Networking Buttons, Payment Plugins , Audio Players and Video Galleries in your website with just few installation steps and no programing acumen.

Gives organic traffic


NGO's and social service organizations need websites which have the functionality to conduct online polls, surveys, feedback and other tools which can carry forward interactions with a large community or a target audience.  WordPress being a highly competitive CMS offer all such tools which embarks on interactions which are quite favorable for the admin of the website.  Thus, it helps you to organically generate traffic and further get attention of people and voluntary donors.

With such a low setting-up cost and affordable maintenance cost, WordPress seems to be the  most viable option for NGOs and social service organizations. I am sure there must be queries regarding the development and other things. Feel free to drop us your queries, we will be glad to help!

Friday, 16 January 2015

Speed Up Your WordPress Website Performance With Varnish Cache

Lets face it, WordPress standard installation is slow. And installing a number of plugins, themes and images makes it a lot more slower. You can minify your CSS and JS with help of “Better WordPress Minify” plugin, or you can use EWWW Image Optimizer plugin to reduce your images file size. However, there are lot of other factors that affects your WordPress site performance.

Possibly by now, you'll be thinking to Hire WordPress Expert to get the job done. But, there's another viable solution. Wondering, what's the solution? Varnish Cache is a web-application accelerator which is designed for dynamic websites with heavy content.

Varnish Cache – A Foreword

This caching system stores copies of pages for readers who aren't logged in into WordPress admin. Whenever users requests for something it reaches to Varnish instead of the server. And then, Varnish looks for what user has requested and then forward the request to the server. The server sends the response to Varnish, which in turn sends that response to user's original request. But if Varnish would only perform such function, it wouldn't be much of help to us.

However, Varnish also help improve performance by storing the responses it has received from the server in the virtual memory. And so, Varnish is able to quickly send the next response to the user instantly from its cache, and thereby the load on server to process users requests is reduced significantly. This eventually help improves the response time and your process requests can be carried on great speeds.

How to Install Varnish Cache?


We’ll be setting up Varnish to listen to all web requests on port 80, while Apache will be supporting Varnish on port 8080. So, when Varnish will ask for a page that needs to be built manually, the request will get passed on to the Apache port 8080. Let's look at Varnish installation on our instance:


Edit Apache’s ports.conf file to listen on port 8080:



sudo nano /etc/apache2/ports.conf

You'll get the following outcome:

NameVirtualHost *:8080

Listen 8080



Next, you need to edit your “Apache” website config file in order to respond to port 8080:

sudo nano /etc/apache2/sites-available/wordpress

Now, change the virtual host from *:80 to *:8080

<virtualhost *:8080>


You'll require to change your Apache default website to listen for web request on port 8080 or need to disable it:


sudo a2dissite 000-default


In case, you've decided to review your original Varnish configuration files later, you'll have to move those files to your home directory in the form of backups.

sudo mv /etc/default/varnish ~/default-varnish-old

sudo mv /etc/varnish/default.vcl ~/varnish-default-vcl.old



Replace your default Varnish configuration file with the one given below (copy and paste).

sudo nano /etc/default/varnish



Let's look at the configuration file that needs to be replaced:

/etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK

# to be set from this shell script fragment.

#

# Should we start varnishd at boot? Set to "no" to disable.

START=yes

# Maximum number of open files (for ulimit -n)

NFILES=131072

# Maximum locked memory size (for ulimit -l)

# Used for locking the shared memory log in memory. If you increase log size,

# you need to increase this number as well

MEMLOCK=82000

# Default varnish instance name is the local nodename. Can be overridden with

# the -n switch, to have more instances on a single server.

# INSTANCE=$(uname -n)



How to Configure Varnish?

Once Varnish is installed, edit your port and change it to 80. Just remember not to change your Apache port yet, and keep it running till you're sure that everything complies properly. Moreover, if you're not sure about your configuration files, configure Varnish for port 81, and the perform a side-by-side test without losing your users:

nano /etc/default/varnish

DAEMON_OPTS="-a :80 \

             -T localhost:6082 \

             -f /etc/varnish/default.vcl \

             -S /etc/varnish/secret \

             -s malloc,256m"



Next, make you'll need to make copy of the original VCL file:


mv /etc/varnish/default.vcl /etc/varnish/default-old.vcl


Configuring Apache


After configuring your Varnish cache, edit your Apache (or HTTP Server) so as to use some other port. (8080) Make sure to verify whether virtual host also configs or not.

nano /etc/apache2/ports.conf

NameVirtualHost *:8080

Listen 8080


Now restart the HTTP Server and Varnish. Varnish will listen to HTTP (web) traffic on port 80, and Apache in 8080.  But, how does Varnish will come to know where it needs to look for the HTTP Server? For this purpose, look at the top of default.vcl file.


/etc/init.d/apache2 restart

/etc/init.d/varnish restart

Getting Rid of Content from WordPress


In case you need to purge your WordPress website content manually or automatically when the posts are saved, install the Varnish HTTP Purge extension to your site. For doing so, add the following line of code to your
wp-config.php file:

define('VHP_VARNISH_IP','126.0.0.1');


Wrapping Up!


Adding plugins, images and other elements to your WordPress site makes it sluggish. However, you can make your WordPress site performance faster with help of Varnish Cache. This post will help you gain insight on Varnish cache, it's installation and configuration.