Best WordPress Plugin for Improving Your Customer Service


I have search many support plugin for WPSeeds support and finally  found most popular WP Support Plus plugin.

The plugin works great, installation and configuration are very simple, and customization is a breeze.

It seems like a very nice and clean plug-in so far. It is great for someone who needs something quickly and make it up.

And most important is  No need Third Party Support Services.

This plugin adds to WordPress the features of a complete ticket system with 100% responsive and 100% Ajax functionality. This allows users to submit tickets to report problems or get support on whatever you want. Users can set the status, priority and category of each ticket.

This one adds a ticketing system where users can submit a ticket to get support. The users can set the status, priority, and category of each ticket. Tickets can be submitted through the admin panel or through the frontend. They can attach files to the tickets and to email.

It adds a nice dashboard that’s intuitive to use. The dashboard shows you the tickets along with their subject, status, when it was submitted, etc. You can click on each ticket to handle it. You can also sort the tickets by status, type, category, and priority. There is a search feature so you can search through them to see history or find something specific. And you can create a ticket form this dashboard if you want to create it yourself. There is also a tab for Agents where you can set the agent’s signature.

You create the support page by choosing the page or post from a dropdown list and then placing a shortcode on that page or post. It will also give you a support button that will appear on your site. You can choose its location from a list of choices. It will add a captcha to avoid spam and you will receive the ticket in the admin panel and as an email.

You can get more pro features on following link :

http://pradeepmakone.com/wpsupportplus/

Secure your WordPress Plugin : CSRF protection


I fixed this vulnerability in my WordPress ‘WP Database Backup‘ plugins and would like to share the same knowledge to other developers.

Lest you think this security stuff isn’t important, a major vulnerability was recently found in the WordPress plugins, which is installed on many WordPress sites and which allowed hackers to manipulate the WordPress database using CSRF(Cross-Site Request Forgery).

Cross-site request forgery, also known as a one-click attack or session riding and abbreviated as CSRF or XSRF, is a type of malicious exploit of a website whereby unauthorized commands are transmitted from a user that the website trusts. Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user’s browser.

How to Prevent CSRF

We can stop CSRF attacks by using some handy functionality built into WordPress.

  1. A nonce is generated.
  2. That nonce is submitted with the form.
  3. On the back end, the nonce is checked for validity. If valid, the action continues. If invalid, everything halts – the request was probably forged (You verify the nonce before doing anything else).

The nonce field is used to validate that the contents of the form request came from the current site and not somewhere else. A nonce does not offer absolute protection, but should protect against most cases. It is very important to use nonce fields in forms.

Let’s Add a Nonce

1.First create nonce using wp_create_nonce  function and pass it along with your request.

<input name=”wpdbbackup_update_setting” type=”hidden” value=”<?php echo wp_create_nonce(‘wpdbbackup-update-setting’); ?>” />

2.Verify nonce using wp_verify_nonce function.

if (!isset($_POST[‘wpdbbackup_update_setting’]))
die(“<br><br>Invalid form data. form request came from the somewhere else not current site! “);
if (!wp_verify_nonce($_POST[‘wpdbbackup_update_setting’],’wpdbbackup-update-setting’))
die(“<br><br>Invalid form data. form request came from the somewhere else not current site! “);

Using nonces you can stop forgery, and foil hackers!

Cross-browser compatible


Cross-browser compatible Compatible with all major browsers available

During the creation of a website — especially if your aim to make its structure responsive — one of the most important and frequent problems that a web designer has to face involves cross-browser compatibility, that is, compatibility across different browsers.

Web developers must test and adapt their sites to work with multiple browsers. For example, if a certain page looks fine in Firefox, but does not show up correctly in Internet Explorer, the developer may change the formatting so that it works with Internet Explorer

The goal with cross-browser compatibility is to make your site viewable in the major browsers available and have the pages render correctly.when a website is developed for multiple browsers, it is called a cross-browser website.

Create a cross-browser compatible website:

  1. Use only standard compliant coding.
  2. Don’t use browser specific (proprietory) HTML tags and features.
    • These only work in the browser they were created for and may even break your web page when viewed in another browser.
  3. Validate your web pages.
    • Validate your HTML/XHTML coding using the W3C free validation service
    • Validate your cascading style sheets using the W3C free validation service

The largest problem is that media queries do not work with older browsers. Consequently, a responsive web page with many CSS3 rules applied can be seen correctly only by those who have recently-updated browsers with strong CSS3 support. Fortunately, there are some  JavaScript solutions that can help us serve responsive websites to older browsers lacking CSS3 support: Respond.js, Modernizr, andadaptive.960.js

 

force a web browser NOT to cache images


Problem

The problem happens when the administrator wants to change the picture. He would just have to hit the “browse” button, pick a new picture and press ok. And this works fine.

Once the image is uploaded, back-end  handles the upload and reloads the form properly.

The problem is that the image shown does not get refreshed. The old image is still shown, even though the database holds the right image. (fact that the IMAGE IS CACHED in the web browser).

Solution:

The problem is random strings can collide. You can use:

<img src="picture.jpg?1222259157.222" alt="">

where “1222259157.222” is the current time on the server.

Creating Great URLs


Creating URLs for your site is more important for increase SEO. You need to select proper URL for pages.

Good SEO practices for URLs is to keep them under 100 characters long, to use dashes instead of underscores and to avoid special characters.

Bad URL:

https://walkeprashant.wordpress.com/php_que=asdasdasda133213ASADSSAD

This URL doesn’t have any significance to your user.

Good URL:

http://www.technorati.com/technology/php/

This URL is clean, each folder (“technology” and “php” in the URL) makes sense, and it gives us a pretty good idea of what we’ll find when we visit the page (technology php).

How to Creating Great URLs

  • It should be obvious: If a user can look at your URL and make an accurate guess about the contents of your page, you’re on the right track.
  • Use keywords when you can:Those keywords that you spent so much time researching for your content can be used in your URL. Name your folders accordingly, using the keywords where appropriate.
  • Shorter is better:A short URL is easier to copy and paste, say, and write.
  • Never use multiple subdomains: 
  • Avoid too many folders: A folder creates one more layer that search engines have to crawl through—omit unnecessary folders from your site structure.
  • Don’t use uppercase characters:Keep your URLs simple and concise by always using lowercase text.
  • Don’t use any symbols:Search engines treat dynamic and static URLs differently, so keep yours static—that means no random characters. “?^&” means nothing to your user. If your website is in the CMS, then you have nothing to worry about—all CMS URLs are static.

Cron job fail to include files


If you select php as the command language for your cron job, relative paths may not work. This is because some PHP scripts expect to be run from the directory where they are stored, and due to the nature of our Sites platform they will be run from another location. This means including or requiring files from a relative path may result in errors such as:

 PHP Warning: include(../dbconnection.php): failed to open stream: No such file or directory
Solution

To correct this problem, you could use the absolute path to reference any files in your script. An absolute include looks something like this:

include('/var/www/html/dbconnection.php');

Disable WordPress Admin Bar


 Disable WordPress Admin Bar for All Users Except Admin

if you want Disable WordPress Admin Bar for All Users Except Admin then Paste following code in your theme’s functions.php file

add_action('after_setup_theme', 'remove_admin_bar');
 function remove_admin_bar() { 
if (!current_user_can('administrator') && !is_admin()) 
{ show_admin_bar(false); } }

Disable Admin Bar for All Users

If you want to disable Admin Bar for all users, then past following code in your theme’s functions.php file

 show_admin_bar(false);

Disable Admin Bar for certain role

Use this if you want this only for a certain role

function remove_admin_bar() {
$user = wp_get_current_user();
if (in_array('subscriber', $user->roles)) {
show_admin_bar(false);
}
}
Use WP User plugin for Enable / Disable Admin Bar

Why WordPress is popular blogging system?


About WordPress

  • WordPress started in 2003
    • It was first released on May 27, 2003, by its founders, Matt Mullenweg and Mike Little
  • WordPress is an Open Source projectwordpress_use_graph

    • WordPress was used by more than 22.0% of  the top 10 million websites as of August 2013
    • WordPress is the most popular blogging system in use on the Web, at more than 60 million websites

What You Can Use WordPress For

WordPress started as just a blogging system, but has evolved to be used as full content management system.

  • Personal blog
  • Photoblog
  • Business website
  • Professional portfolio
  • Government website
  • Magazine or news website
  • E-commerce Application

WordPress FeaturesWP_feature

  • Simplicity
  • Flexibility :   With WordPress, you can create any type of website you want
  • Publish with Ease :  You can create Posts and Pages, format them easily.
  • User Management
  • Easy Theme System
  • Extend with Plugins
  • Built-in Comments
  • Search Engine Optimized
  • Easy Installation and Upgrades
  • Community

Famous Brands That Use WordPress

Georgia State’s  univercity : http://www.gsu.edu/

Sweden’s Official Site: https://sweden.se/

Bata is a family-owned global footwear and fashion accessory manufacturer and retailer : http://www.bata.com/

Coca-Cola France  The French site of the popular soft drink runs on WordPress:  http://www.coca-cola.fr/

Sony Music Entertainment : http://www.sonymusic.com/

Time is an American weekly news magazine published in New York City, and the flagship publication of Time Inc:  http://www.times.com/

Popular blogs:

WordPress is a powerful semantic publishing platform, and it comes with a great set of features designed to make your experience as a publisher on the Internet as easy, pleasant and appealing as possible.

Backing up your WordPress database


Your database contains all your important information if the database is erased or corrupted you lose everything.

Sometimes accident can happen when we least expert it. If you can have made a careless mistake and your database is gone how can you restore your data in your database?

So Backup your database regularly.

The WordPress backup files contain sensitive data, such as the WordPress administrator credentials. Such files should be stored in a secure location where other users do not have access to. You can also compress the WordPress backups into a password protected zip file so in case someone manages to get a copy of your WordPress backup files, he or she would need a password to access the content.

WordPress Database backup

Backup your WordPress database from CPanel

  1. Login to your hosting provider CPanel and click on the Backup icon in the Files section.
  2. Once in the backup options page, click on the WordPress database name listed under the section ‘Download a MySQL Database backup’.
  3. Once you click on the WordPress database name, a compressed SQL script file is automatically downloaded to your computer.

Store the WordPress database file in a secure place and ideally it should be stored on a different media.

Backup WordPress database using MySQL command line

If you host your own web server and have access to it via SSH or other protocol, you can make a database backup using a MySQL standard tool called mysqldump. As the name implies, the mysqldump tool dumps a MySQL database into a text file which can later be used to restore the WordPress database.

In the below example, we are using the MySQL root user to connect to the MySQL server, selecting the wpdatabase database and exporting it to a text file called wpdb_backup.sql.

Mysqldump –u root –p wpdatabasebk > wpdb_backup.sql

Below is a breakdown of the switches and parameters used in the command:

-u is used to specify the username to connect to the MySQL server.

-p is used to specify a password. If no password is specified in the command line like in the above example, the MySQL server will prompt you to specify the password once you issue the command. For security reasons it is better not to specify the password via command line since it will be stored in the command line history.

Wpdatabasebk is the actual WordPress database name.

> This sign means export. It is used to specify where to export the MySQL server database dump.

Wpdb_backup.sql is the name of the file where the database dump will be stored. If the file does not exist it will be generated by the tool. Once the database is dumped into this file, download it to your computer and store it in a secure location, ideally on a separate media.

Backup WordPress database using phpMyAdmin

phpMyAdmin is a MySQL Server admin web based tool. This can be accessed directly via a specific URL or else from your hosting provider’s CPanel under the Databases section. To backup the WordPress database from the phpMyAdmin follow the below procedure:

  1. Once logged in to phpMyAdmin, depending on your installation you might notice that you have several databases. In that case, select the WordPress database by clicking on it.
  2. Once you select the WordPress database you are redirected to the database options page form where you can launch several database related tasks. As seen in the below screenshot, a list of tables in the database will also be populated. You might have more than 11 tables in your WordPress database, if you have WordPress plugins that store data in the WordPress database.WP-database-backup-phpmyadmin
  3. Click on the Export option (highlighted in the above screenshot) to export/backup the WordPress database to a file. From the Export section, select Custom export and ensure that the below options are selected as highlighted in the below screenshot:
    1. All tables are highlighted.
    2. The option “Add Drop….” from the Object Creation options is enabled. This can be useful in case you are restoring the WordPress database onto an existing one.

Back up your website Using WordPress plugins

There are some limitation in default WordPress installation is backup.The included backup system limits you to exporting posts, pages, comments, custom fields, categories and tags. What you don’t get are backups of directories, files and databases.

There are plenty of plugins available to improve the WordPress database backup solution.

WP Database Backup

If you are use WordPress so you can use backup plugins for take database backup.

If You want to schedule a backup of your WordPress site database but do not have enough permissions to access your host then Install “wp database backup” plug-in.

WP-Database-Backup :When plugin is installed and active. you can backup your blog database easily in single click. Some time you have create database backup on your server or localhost and if some one hack your site or you have made some mistake then how can you recover your database which include important information. So it is important to save your database safer place like FTP, on your Email or Dropbox.

for more information about how to backup database using WP-database-Backup plugin check this link : https://walkeprashant.wordpress.com/wp-database-backup/

Send emails from localhost(WAMP Server)


If you are developing php project on localhost and you are using mail function on your project that time you may face problem with send mail function. so in this tutorial we are explain how to configure sendmail.

Follow the step below for configure sendmail:

Step 1: Download sendmail

Download sendmail and extract all the files in the folder “C:\sendmail\”

Step 2: Configure sendmail.ini

Open the file “C:\sendmail\sendmail.ini” and add the following params in the corresponding lines:

smtp_server=smtp.gmail.com
smtp_port=465
auth_username=your_address@gmail.com
auth_password=your_password
force_sender=your_address@gmail.com

Step 3 : Configure php.ini

Open the php.ini, find the following lines and add the path to the sendmail executable file. Don’t forget to restart the Apache server after doing that.

sendmail_path = "C:\sendmail\sendmail.exe -t"

Step 4: Test

Create a PHP script with the following code:(test.php)

mail('your_email@gmail.com','Test Mail Working','Mail received Successfully!!!!')

Run your test.php file and check your mail.