Author: Sam

This guide will show you how to extend or resize an ext2/3/4 and XFS File System without LVM at runtime. This could be a root partition configured with ext2/3/4 or XFS filesystem but without any LVM configured.

Step 1: Check your current root disk capacity

For this demonstration, I have a CentOS 7 VM with below partition scheme.

$ lsblk 
 sr0     11:0    1 1024M  0 rom  
 vda    253:0    0   10G  0 disk 
 └─vda1 253:1    0   10G  0 part /

As seen from the output, the root filesystem is on /dev/vda1 partition without LVM.

Step 2: Extend your OS root disk

I will extend my root block device to 30GB. I use KVM virtualization technology, so this guide works for me:

For KVM I can check virtual disk path using the command below:

$ sudo virsh domblklist centos7 
 Target   Source
 vda      /var/lib/libvirt/images/centos7.qcow2
 sda      -

$ sudo fdisk -l /var/lib/libvirt/images/centos7.qcow2
Disk : 10 GiB, 10739318784 bytes, 20975232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

$ sudo qemu-img resize /var/lib/libvirt/images/centos7.qcow2 +20G
Image resized.

If you’re on a different Virtualization platform, refer to its documentation for how to extend OS virtual disk.

Step 3: Grow VM partition

Start your VM and ssh as a user with sudo privileges. The first thing to do is to confirm the new disk size.

$ lsblk 
 sr0     11:0    1 1024M  0 rom  
 vda    253:0    0   30G  0 disk 
 └─vda1 253:1    0   10G  0 part /

We can see the disk has grown by 20GB, from 10GB to 30GB. The next action is to expand the partition (Partition 1) in our example, to the maximum size the disk provides.

Install cloud utils package

For those new to growpart, it is a Linux command line tool used to extend a partition in a partition table to fill available space. This command is provided by cloud utils package.

On Ubuntu / Debian system, run:

sudo apt -y install cloud-guest-utils gdisk

For CentOS / RHEL / Fedora server, run:

sudo yum -y install cloud-utils-growpart gdisk

Help page can be viewed by passing -h argument

# growpart -h
growpart disk partition
   rewrite partition table so that partition takes up all the space it can
    -h | --help       print Usage and exit
         --fudge F    if part could be resized, but change would be
                      less than 'F' bytes, do not resize (default: 1048576)
    -N | --dry-run    only report what would be done, show new 'sfdisk -d'
    -v | --verbose    increase verbosity / debug
    -u | --update  R update the the kernel partition table info after growing
                      this requires kernel support and 'partx --update'
                      R is one of:
                       - 'auto'  : [default] update partition if possible
                       - 'force' : try despite sanity checks (fail on failure)
                       - 'off'   : do not attempt
                       - 'on'    : fail if sanity checks indicate no support

    - growpart /dev/sda 1
      Resize partition 1 on /dev/sd

Now use growpart to extend your partition.

$ sudo growpart /dev/vda 1
CHANGED: partition=1 start=2048 old: size=20969472 end=20971520 new: size=62912479,end=62914527

This will resize partition 1 on /dev/vda.

Validate the change.

$ lsblk 
 sr0     11:0    1 1024M  0 rom  
 vda    253:0    0   30G  0 disk 
 └─vda1 253:1    0   30G  0 part /

Step 4: Resize ‘/’ partition to fill all space

The last step is to resize the file system to grow all the way to fill added space

For ext4 file system, use resize2fs

$ sudo resize2fs /dev/vda1
resize2fs 1.42.9 (28-Dec-2013)
 Filesystem at /dev/vda1 is mounted on /; on-line resizing required
 old_desc_blocks = 2, new_desc_blocks = 4
 The filesystem on /dev/vda1 is now 7864059 blocks long.

If your filesystem is XFS, it can be grown while mounted using the xfs_growfs command:

sudo xfs_growfs /

Confirm new size using df -h

$ df -hT | grep /dev/vda
/dev/vda1      ext4       30G  1.2G   27G   5% /

Congratulations!, you have successfully resized an ext2/3/4 or XFS root partition on Linux without LVM.

Go to system/startup.php and find following lines of code:

if (!ini_get('date.timezone')) {

Replace with following lines of code by changing to your timezone


Synchronize PHP and Database Timezone

The query we use to set database timezone if you are super admin is below:

SET time_zone='offset';

But everyone has no super admin access so need to change in the code level. For that go to system/library/db/mysqli.php if you are using MySQLi and add code below after $this->connection->query(“SET SQL_MODE = ””);

$dt = new \DateTime();
$this->connection->query("SET time_zone='" . $dt->format('P') . "';");

With these changes your timezone in Opencart are changed.

Let us know if you find any issues, thanks a lot.

OpenCart is one of the simplest e-commerce platforms to build an online store. OpenCart offers you an ‘easy-to-work-with’ code-base with which you can get an e-Commerce site online, quickly. If you are looking for a safe way to move OpenCart website from one domain to another, follow the process below.

Here are the steps to migrate / move OpenCart website to a new server.

1. Download ALL the files from old server.
2. Create a backup of Database through PhpMyAdmin
3. Upload files to NEW SERVER
4. Install Database on NEW SERVER through PhpMyAdmin
5. Update the configuration files config.php and admin/config.php to reflect your new domain path.

The file should now open up for editing. Here, you will need to edit a few lines of code. Find the lines:


define('HTTP_SERVER', '');


define('HTTPS_SERVER', '');

// DIR


You will need to update these to your correct path. Contact your hosting company for the full path to your public folder.

Next, you need to update the database connection settings. Find the code below:

// DB


You will need to replace these with the new details made in step 3;

DB_HOSTNAME = Your database host (usually localhost).
DB_USERNAME = Your Database username.
DB_PASSWORD = Your Database password
DB_DATABASE = Your database name

Once you have updated these, save the changes & you are done.

Method-1: First Check the Timezone in Settings > Store. Make sure you set to UTC.

If you need to change it back you can in the SQL table “oc_setting” column “key” value “config_timezone” in the “value” column change it back to “UTC”

UPDATE oc_setting SET value='UTC' WHERE key = 'config_timezone';

If still issue, follow below method.

Method-2: You need to set your php time and mysql time the same. its deleting cookies to soon. You can fix this.




$_[‘session_engine’] = ‘db’;


$_[‘session_engine’] = ‘file’;



Step-1: Add 2 hidden fields to the contact form

[hidden your-first-name id:first-name-p]
[hidden your-last-name id:last-name-p]

Step-2: Write below jquery script in the footer

     str = $(this).val();
      s = str.split(/(?<=^\S+)\s/); //split string in name field after first space found. 
      $("#last-name-p").val(s[1]); //s[1] value after the first space set to hidden field.

Output will be list this:-

The response from the remote server was:
550 Please turn on SMTP Authentication in your mail client. []:36503 is not permitted to relay through this server without authentication.


Manage SMTP restrictions

Click Enable to deny users the ability to bypass your mail server to send mail. To allow users the ability to bypass your mail server, click Disable.

(WHM >> Home >> Security Center >> SMTP Restrictions)

We recently redesigned a WordPress site for a client who was migrating away from WP Engine. When we migrated the client to the new host, they still had a “WP Engine” section in their WordPress dashboard main menu.

WP Engine WordPress Menu Item

Since this feature set would no longer be utilized, it was best to get the plugins removed to keep things lean and tidy.

While cleaning up those WPE remnants, we put together a short guide on how to remove these plugins on your own. Hope it helps!

1. First things first, backup

In order to remove these WP Engine plugins and remnants, we’ll be making some changes to the file structure, and modifying a core WordPress file. That means you should create a full backup of your WordPress environment in the event that something goes wrong. Broken sites and lost data make for a bad day, so backup to stay safe!

2. Delete WP Engine Plugin Folders and Files

Once your backup is safely made, connect to your WordPress environment via FTP, or via your cPanel’s file manager. Locate the “wp-content” folder in your base WordPress directory, then delete the following files and folders.

  • wp-content/mu-plugins/mu-plugin.php
  • wp-content/mu-plugins/wpengine-common/
  • wp-content/mu-plugins/slt-force-strong-passwords.php
  • wp-content/mu-plugins/force-strong-passwords/
  • wp-content/mu-plugins/stop-long-comments.php
  • wp-content/advanced-cache.php
  • wp-content/object-cache.php
  • wp-content/mysql.sql

Once you have deleted all of these files and folders, if the “mu-plugins” folder is now empty, you can go ahead and delete it too.

3. Delete WP Engine git files from the root

Next, head back to your WordPress root directory, and look for and delete these two files.

  • .gitattributes
  • .gitignore

WP Engine .gitattributes and .gitignore files

4. Generate a fresh wp-config.php file for your installation

WP Engine modifies your site’s wp-config.php file. Now that you have removed all of their leftover elements from your installation, you will also want to make sure that your site is running on a clean wp-config file.

Firstly, locate and open the wp-config.php file in the root of your WordPress environment.

Now head to GenerateWP to grab a clean code set for the wp-config file. Copy the code from GenerateWP and paste it into a new file in your text editor.

Now jump back to your current wp-config file which you opened a moment ago. You will want to copy the values for all of these fields and paste them into the new wp-config file that you just created.

Database credentials

  • define( ‘DB_NAME’,
  • define( ‘DB_USER’,
  • define( ‘DB_PASSWORD’,
  • define( ‘DB_HOST’,
  • define( ‘DB_CHARSET’,

wp-config database values

If your table prefix begins with anything other than “wp_” (uncommon)

Be sure to update your table prefix if it begins with anything other than “wp_”

  • $table_prefix =

wp-config table prefix

WordPress Secret Keys & Salts

  • define( ‘AUTH_KEY’,
  • define( ‘SECURE_AUTH_KEY’,
  • define( ‘LOGGED_IN_KEY’,
  • define( ‘NONCE_KEY’,
  • define( ‘AUTH_SALT’,
  • define( ‘SECURE_AUTH_SALT’,
  • define( ‘LOGGED_IN_SALT’,
  • define( ‘NONCE_SALT’,

wp-config secret keys and salts

After entering all of your database values, keys, and salts, save the new file as wp-config.php, then upload it to the root of your WordPress installation, overwriting the existing file.

Once that is complete, log into your WordPress admin panel and you should now be free of all WP Engine menus and plugins.


Typical error message, meaning that PHP ext-zip extension is missing:

laravel/installer v2.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.

Fix me

First, get PHP version running on your computer:

php --version

Then, on Ubuntu, just run this command:

# For php v7.0
sudo apt-get install php7.0-zip
# For php v7.1
sudo apt-get install php7.1-zip
# For php v7.2
sudo apt-get install php7.2-zip

On CentOs:

yum install php-pecl-zip

Done! Hope it helps!