Upon reading many wordpress forums, finally got a solution.
Simply follow the below steps to solve this,
1. Create a custom php.ini file in public_html folder. 2. Add the following lines in php.ini file: upload_max_filesize = 16M upload_tmp_dir = on upload_tmp_dir = /home/username/tmp Please make sure to replace username with your hosting username 3. Copy the same php.ini file to your wp_admin folder.
Its quite easy to move magento site from subdomain to main domain (and vice-versa). You can do it by two different ways and it is more easy when you go with the below steps.
Go to Magento Admin Page –> System –> Configurations –> Web –> Unsecure URL & Secure URL. Change both the secure URL and unsecure URL to the domain that you are going to be moved to. Be sure to include the “/” at the end of the domain name.
Go to your File Manager and click “Select All”. Click “Move” and key in “/public_html” to move it to the main domain’s directory.
You need to clear the caches at “var/cache” and “var/session” after you have moved all files over.
Go to phpMyAdmin. Find and and choose your database on which your magento site is running. Scroll down and look for core_config_data table and click “Browse”.
Find the path “web/unsecure/base_url” and “web/secure/base_url”.
Click on the "Edit" of both of the path above and edit the URLs accordingly. Click “Go” after the URLs have been edited.
Once the URLs has been edited, you need to clear the caches at “var/cache” and “var/session”
Note:- It is always good to have backup your files and databases before doing these exercises.
Usually we just remove Cloudlinux kernel from the server and reboot the server to run with normal CentOS kernel. After rebooting the server, we might face SSH access to the server. The server will prompt password and after entering the password, it will show 'Lost Login' details then you face "Connection Closed" issue.
While removing Cloud-Linux from the server, the pam module of sshd service still remains on the server. This caused unable to access the server through SSH.
The caused pam module is pam_lve.so.
You need to comment the below line in the file called /etc/pam.d/sshd (login the server through KVM or any other interface you have to access the server shell)
This tutorial will explain about how to change that Swap space partition to the newly attached drive[ here its /dev/sdd]
Currently the swap space has been allocated on the drive /dev/sdc. In order to check the swap space details, use the below command.
# swapon -s Filename Type Size Used Priority /dev/sdc1 partition 4192924 102580 -1
Also check the mounted partitions details on /etc/fstab file # cat /etc/fstab /dev/sda / ext4 usrjquota=quota.user,jqfmt=vfsv0 0 0 /usr/tmpDSK /tmp ext3 defaults,noauto 0 0 /dev/sdc1 swap swap defaults 0 0
Then look onto the details about the newly attached drive using fdisk command. The output in our case is below. Here the older swap disk is /dev/sdc with Linux Swap partition and the new raw drive [/dev/sdd] has been attached.
Disk /dev/sdc: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9fc28f0c Device Boot Start End Blocks Id System /dev/sdc1 1 522 4192933+ 82 Linux swap / Solaris Disk /dev/sdd: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
Now, create a swap partition on the newly attached drive by using the below commands, # fdisk /dev/sdd-- accessing the drive to create a partition then press 'm' for help, there you can see many command option to create partition and make it as swap partition. command 'n' for creating new partition, 't' to change the partition type. Once the partition has been created with Linux Swap type, you can see these details by pressing 'p' to print the partition lists, once verified the new settings, press 'w' to write the changes on the disk. Disk /dev/sdd: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9c471342 Device Boot Start End Blocks Id System /dev/sdd1 1 522 4192933+ 82 Linux swap / Solaris
Lets issue the command 'partprobe' to tell about the new changes on the disk to the kernel, in order to reboot the server. Then make swap space on the newly created partition by using the below command. # mkswap /dev/sdd1 Setting up swapspace version 1, size = 4192928 KiB no label, UUID=09e7d007-2459-4d9d-bc6b-8d8cd1825596
Once the swap partition has been created on the new partition, use the 'swapon' command to use this drive as follows and to see the active swap partition, you can use 'swapon -s' command. # swapon /dev/sdd1 # swapon -s Filename Type Size Used Priority /dev/sdc1 partition 4192924 102580 -1 /dev/sdd1 partition 4192924 0 -2
We have achieved the target now, and the server is using two partitions for swap space. Here the drives /dev/sdc and /dev/sdd being used for Swap Space.
If you want to remove the old drive from the Swap partition, yes we can do this by simply issuing the below command with the drive name. # swapoff /dev/xdc1
Once the old drive has been swap off, we can ensure this by issuing the 'swapon -s' command to see the current swap space details. Also make the necessary changes for swap on the /etc/fstab, in order to take effect on next boot. This means, change the drive name on /etc/fstab to new one.
# swapon -s Filename Type Size Used Priority /dev/sdd1 partition 4192924 0 -1