Category Archives: Content Management Systems

Quickly Deactivate or Activate All WordPress Plugins via Database or FTP

WordPress plugin activate deactivate all at once and Quickly

Sometimes during troubleshooting, it’s recommend to deactivate all plugins and activate them one by one and suppose at that time you will not able to login in WordPress admin (wp-admin) or white screen of death. At the same point we need to disable all the plugin or some plugin then in that case, How will you disabled/deactivate all or some plugin manually by the database or using FTP. Some time we need it to do very quickly.
I am sharing with you the technique by which you can quickly disable and (re)enable your entire set of WordPress plugins.

 

Deactivate All Plugins Using FTP

 

Navigate to the “/wp-content/” folder. You will see a folder called plugins. Rename the plugins folder to anything like  “plugins-deactivate”. Once you do this, all of your plugins will be deactivated automatically.

 

There may be due to some issue with plugin and it locked out your admin panel. If the issue was with your plugin, you should be able login to your “/wp-admin/” after deactivating the plugin. Once you do that, go back to your /wp-content/ directory and rename “plugins-deactivate” back to plugins. You can troubleshoot the problem by activating plugin one by one until your site breaks again.

 

 

Deactivate all plugins using phpMyAdmin

 

Login to your database using with phpMyAdmin and then have a backup.
I always suggest you to take Backup before doing any updates in table directly, so please in first step take backup of your database.
If you have backup of your database, you can quickly restore that and can revert your changes, so in this case(if there will some accident) you will always in safe hands.

 

Now, search a row in “wp_options” table that have “option_name” as “active_plugins”. Use the following SQL query (update your Database table prefix “wp_” if needed) for doing the same job.

 

SELECT * FROM wp_options WHERE option_name = ‘active_plugins’;

 

Once you found active_plugins column, click to edit it. You will see something like the below, depends on the number and type of plugins you have installed:

 

a:13:{i:0;s:19:”akismet/akismet.php”;i:1;s:23:”all_in_one_seo_pack.php”;i:2;s:28:”breadcrumb-navigation-xt.php”;i:3;s:37:”contact-coldform/contact_coldform.php”;i:4;s:13:”feedcount.php”;i:5;s:36:”google-sitemap-generator/sitemap.php”;i:6;s:13:”gravatars.php”;i:7;s:30:”nofollow-free/nofollowfree.php”;i:8;s:17:”ol_feedburner.php”;i:9;s:26:”simple_recent_comments.php”;i:10;s:18:”simple_twitter.php”;i:11;s:9:”top10.php”;i:12;s:16:”wp-db-backup.php”;}

 

This is a serialized array, you can unserialize this array by simply using the tool “http://www.functions-online.com/unserialize.html“. Copy the above string and click on run button you will get an array that represents every activated plugin on your site.

 

Thus, to quickly disable all plugins without using the wp-admin is cut the serialize array string as we have seen above and paste it into a safe notepad (text) file. After removing the code, click the button to save your changes and that’s it. All WordPress plugins are now deactivated (although you have all the plugins files in the same place “wp-content/plugins” and you can activate the plugin whenever you want by wp-admin area- if found working). This above method is obviously handy during, when the situation is critical and time-sensitive. Once you are ready to re-enable your entire set of plugins, simply copy & paste the preserved code(serialized array string) by notepad file and put it in the “active_plugins” field. Click save and done.

 

If you want to activate only some of those, unserialize the array by the above tool and make the array of plugins you want to activate then serialize that and put the string in the “activate_plugins” columns.

 

You can also go with a very simple SQL query to disable all plugins in one second.

UPDATE wp_options SET option_value = ” WHERE option_name = ‘active_plugins’;

 

 

This method works only for WordPress older versions(2.9 or older) for later use the below.

UPDATE wp_options SET option_value = ‘a:0:{}’ WHERE option_name = ‘active_plugins’;

Remove WordPress version number from the head section and RSS feeds & also from version parameter in JS and CSS files

Remove WordPress version number from the head section and RSS feeds & also from version parameter in JS and CSS files

 

By default WordPress adds a Meta tag in the headers which displays the current using WordPress version number.

This version number is added just for tracking the site on WordPress, it is not required by your application, but this information can be very much useful to hacker to identify which version of WordPress you are using.

If you are not using latest WordPress version, the hackers can target the known vulnerabilities in that version to hack your site.
You can check all the Vulnerability in “Open Sourced Vulnerability Database” founded at http://osvdb.org/

 

There are various ways that can be used to remove this information below is the best one.

 

Add these following codes to in your functions.php file of your theme according to your requirements.

<?php

/* Function to hide WordPress version number
*  from the head section and RSS feeds on your site.
*/

function my_remove_version_info() {
return ”;
}
add_filter(‘the_generator’, ‘my_remove_version_info’);
?>

 

Remove the “ver” parameter from all enqueued CSS and JS files in the page

<?php

/* remove wp version param from any enqueued scripts (css/js)*/
function vc_remove_wp_ver_css_js( $src ) {
if ( strpos( $src, ‘ver=’ ) )
$src = remove_query_arg( ‘ver’, $src );
return $src;
}
add_filter( ‘style_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 );
add_filter( ‘script_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 );
?>

 

Remove only the “ver” parameters which have WordPress version number from all enqueued CSS and JS files in your page.

<?php

/* remove wp version param from any enqueued scripts (css/js)*/
function vc_remove_wp_ver_css_js( $src ) {
if ( strpos( $src, ‘ver=’ . get_bloginfo( ‘version’ ) ) )
$src = remove_query_arg( ‘ver’, $src );
return $src;
}
add_filter( ‘style_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 );
add_filter( ‘script_loader_src’, ‘vc_remove_wp_ver_css_js’, 9999 );
?>

 

It is always recommended that you have the most updated version of WordPress.

 

PHP: Choose The Best Shopping Cart Software

PHP: Open Source E-Commerce Shopping Carts Software

Choosing right shopping cart software is one of the most crucial steps to making your on-line business successful.

 

A customer always needs to be able to purchase products as easily as possible, with a sense of security.

 

A business owners always choose software that should be simple to use with useful features and great customer support whenever needed and some marketing related tools.

The following are the general criteria that are generally used to evaluate the best shopping cart software.

 

Web Design

The design features of shopping cart software should include an array of design templates to choose from and step-by-step wizards or WYSIWYG editors for storefront development. The templates should be easy to use and should offer customization options that enable you to create the perfect site for your business.

 

Administration & Inventory Control

Shopping cart software includes a range of administrative features that allow you to manage your inventory. An administrative dashboard provides access to product upload, editing and management options. The best shopping cart software applications allow you to upload an unlimited number of products and sell both hard (physical) and soft goods (services or downloadable products, such as software).
Beyond inventory control, the best shopping cart software offers comprehensive payment options and integration with accounting software.

 

Marketing

Shopping cart eCommerce software should include robust marketing tools to help you generate more traffic to your site and thus increase sales. For instance, you should be able to automate abandoned cart emails, offer daily deals and implement a loyalty program for your shoppers. Additionally, the software should allow you to run detailed sales reports so that you can easily identify your best – and worst – selling products.

 

Security

Security is a chief concern for online shoppers, so it’s crucial to make sure that the shopping cart website you use offers standard security features. These should include fraud protection, SSL secure checkouts that encrypt customers’ payment information, as well as data backup and restoration to protect your business records.

 

Help & Support

The manufacturers of top-notch shopping cart software provide comprehensive support resources that you can reference, including a knowledge-base, community forums and video tutorials. The manufacturer should also provide direct technical assistance via email or telephone.

 

According to these criteria and popularity I am sharing the 10 Best Open Source Shopping Carts.

 

You can also view the popularity on Wikipedia link as below.
http://en.wikipedia.org/wiki/Comparison_of_shopping_cart_software

 

1) Magento

magento-logo

Magento is a feature-rich eCommerce platform built on open-source technology that provides online merchants with unprecedented flexibility and control over the look, content and functionality of their eCommerce store. Magneto’s intuitive administration interface features powerful marketing, search engine optimization and catalog-management tools to give merchants the power to create sites that are tailored to their unique business needs.

 

See more
Front: http://demo.magentocommerce.com/
Admin: demo-admin.magentocommerce.com/index.php
Username: admin Password: 123123

 

2) Prestashop
prestashop-logo

Prestashop is an award winning e-commerce solution having won the Best Open Source Business Application. Having been distributed under the open source license, Prestashop now powers thousands and thousands of online stores across the globe. It is also backed by an active community of developers who frequently develop various add-ons for extending the functionalities of Prestashop. Currently, PrestaShop has around 275 e-commerce features that make online business an easier and simpler affair for online merchants.

 

See more
Front: http://demo-store.prestashop.com/en/
Admin: http://demo-bo.prestashop.com/demo/index.php?controller=AdminLogin&[email protected]
Username: [email protected] Password: prestashop_demo

 

3) Open cart
opencart-logo

OpenCart is an open source PHP-based online shopping cart system. A robust e-commerce solution for Internet merchants with the ability to create their own online business and participate in e-commerce at a minimal cost. OpenCart is a turn-key ready “out of the box” shopping cart solution. You simply install, select your template, add products and you’re ready to start accepting orders.

 

See more
Front: http://demo.opencart.com/
Admin: http://demo.opencart.com/admin/
Username: demo Password: demo

 

4) VirtueMart
virtuemart-logo

VirtueMart is an Open Source E-Commerce solution to be used together with a Content Management System (CMS) called Joomla!. Joomla! and VirtueMart are written in PHP and can be used in typical PHP/MySQL environments. Viruemart is not developed by Joomla!, however its works perfectly with it and blends seamlessly with Joomla!. If you would like to read more then here is an article which VirtueMart – A Perfect Ecommerce Platform for Joomla!

 

See more
Front: http://virtuemart.net/features/demo
Admin: http://demo.virtuemart.net/administrator/
Username: demo Password: demo

 

5) OSCommerce
oscommerce-logo

OSCommerce is an online shop e-commerce solution that offers a wide range of out-of-the-box features that allows online stores to be setup fairly quickly with ease, and is available for free as an Open Source based solution. Today, osCommerce has been taken to the next level, moving towards an e-commerce framework solution that not only remains easy to setup and maintain, but also making it easier for store administrators to present their stores to their customers with their own unique requirements.

 

See more
Front: http://demo.oscommerce.com/

 

6) Zen-cart
zencart-logo

ZenCart truly is the art of e-commerce; free, user-friendly, open source shopping cart software. The ecommerce web site design program is being developed by a group of like-minded shop owners, programmers, designers, and consultants that think ecommerce web design could be and should be done differently. ZenCart offers great support and tutorials and has extensive documentation to help you at every stage.

 

See more
Front: http://www.15.zen-cart-demo.com/
Admin: http://www.15.zen-cart-demo.com/
Username: admin Password: password123

 

7) UberCart
ubercart-logo

Ubercart is an exciting open source e-commerce shopping cart that fully integrates your online store with Drupal, the leading open source content management system. This is a killer combination for anyone looking to build a community around a product, sell access to premium content, offer paid file downloads, and much much more!

 

See more
Front: http://www.ubercartdemo.com/
Admin: http://www.ubercartdemo.com/user/login
Username:demo Password: demo

 

8) Xcart
x-cart-logo

X-Cart or XCart is a PHP/MySQL based secure shopping cart software that uses Smarty template engine for easy and unlimited design creation. X-Cart is template based software with open source code. This means you can modify the look & feel and functionality of the shopping cart the way you need should you require any business specific features.

 

See more
Front: http://demo.x-cart.com/demo/home.php
Admin: http://demo.x-cart.com/demo/admin/
Email: [email protected] Password: master

 

9) Miva Merchant
miva-merchant-logo

Miva Merchant is a mature and robust e-commerce storefront solution with the usual sorts of e-commerce functionality. It allows you to create and manage an e-commerce catalogue, handle payments and shipping – as well as Inventory and Merchandising capabilities.

 

See more
Front: http://www.mivamerchant.com/products/demo/mm5/merchant.mvc?Screen=SFNT&Store_Code=Miva_fresh_2
Admin: http://www.mivamerchant.com/products/merchant/mm5/admin_demo.html
Username: demo Password: demo

 

10) CubeCart
cubecart-logo

CubeCart is a complete ecommerce shopping cart software solution. With CubeCart you can quickly setup a powerful online store to sell digital or tangible products to new and existing customers globally. CubeCart is one stop shop solution for everyone, whether you are a retailer or a web developer, you can install CubeCart and get your ecommerce store running in minutes.

 

See more
Front: http://demo.cubecart.com/cc5/
Admin: http://demo.cubecart.com/cc5/admin.php
Username: admin Password: password

 

Save

What is the HTML DOM(Document Object Model)?

The HTML DOM views an HTML document as a tree-structure. The tree structure that is defined known as a node-tree.All nodes can be accessed through the tree. Their contents can be modified or deleted, and new elements can be created.

 

Programming Interface
In the DOM, HTML documents consist of a set of node objects. The nodes can be accessed with JavaScript (Client side programming language).
The programming interface of the DOM is defined by standard properties and methods.

 

HTML DOM Properties are
x known as HTML element or object of DOM
x.innerHTML – the text value of x
x.nodeName – the name of x
x.nodeValue – the value of x
x.parentNode – the parent node of x
x.childNodes – the child nodes of x
x.attributes – the attributes nodes of x

 

HTML DOM Methods
Some simple DOM methods are
x.getElementById(id) – get the element with a specified id
x.getElementsByTagName(name) – get all elements with a specified tag name
x.appendChild(node) – insert a child node to x
x.removeChild(node) – remove a child node from x

 

The innerHTML Property
The easiest way to get or modify the content of an element is by using the innerHTML property.innerHTML is not a part of the W3C DOM specification. However, it is supported by all major browser.

 

Events
Every element on a web page has certain events which can trigger JavaScript functions. Events are normally used in combination with functions, and the function will not be executed before the event occurs!
Events examples
> A mouse click
> A web page or an image loading
> Mousing over a hot spot on the web page
> Selecting an input box in an HTML form
> Submitting an HTML form
> A keystroke