Common, PHP

PHP script to unzip file

Hello friends here is the php script to unzip .zip files.

$zip = new ZipArchive;
$res = $zip->open(‘’);
if ($res === TRUE) {
echo ‘woot!’;
} else {
echo ‘doh!’;

Algorithms, PHP

Php program for insertion sort, Easy implementation

Php program for insertion sort. Easy implementation.

here is the link just try once

/**Function for sorting an array with insertion sort algorithm.
* @param array $array
* @return array
function insertionSort(array $array) {
for ($i=1;$i<$length;$i++) {
while($j>0 && $array[$j-1]>$element) {
//move value to right and key to previous smaller index
//put the element at index $j
return $array;
$array = range(0, 19);
$arr = insertionSort($array);

here is the link just try once

Common, wordpress

Backup & Restore wordpress from localhost to Remote Server

Recently I stuck in the middle. I had completed the wordpress theme in wamp(Windows), and now I wanted to move it to cPanel (linux). And the had full path like C:\wamp\www. Now when I uploaded this theme to server, the uploaded version of it was totally distorted.
I tried different approaches to solve this problem like find & replace & many other efforts.
But after all they did not worked for all the problem of path in option table for wordpress database.
Then I found this plugin that makes copy of your database now you need to install this plugin.
Secondly you have to create a backup of your wordpress. Then It will give you a link of zip archive. Now upload that link to your server.
To restore this backup into the Remote Server just give the link like this
And just click the upload you will see the same wordpress will is restored in remote server also.

Common, wordpress

Need to Increase Word Press memory

Need to Increase Word Press memory  Edit this file here – wp-includes/default-constants.php

// set memory limits
if ( !defined('WP_MEMORY_LIMIT') ) {
if ( is_multisite() ) {
define('WP_MEMORY_LIMIT', '64M');
} else {
define('WP_MEMORY_LIMIT', '40M');


change 40 to some other value