WordPress migration with FTP

Scenario:
Old Site: www.domain.com/blog
Path: /home/domain/public_html/blog
New Site: www.domain.com (Assume the site is empty)
Path: /home/domain/public_html

In order to move the WordPress account manually without any plugin, you may choose to use FTP to perform download and upload.

Folder/File:
1.  Download your web file/folder from /home/domain/public_html/blog to your PC.
2. Reupload those file/folder back to the /home/domain/public_html.
3. If you using Permalink and having mod_rewrite rule, you may edit your .htaccess file from your local PC from,

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

To,

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

4. Upload the .htaccess file to /home/domain/public_html.

Database:
1.  You may backup through SSH, PHPMyAdmin or any other method.
2. Download the backup file through FTP.
3. Open Notepad, find and replace from www.domain.com/blog to www.domain.com.
4. Upload the database back to the server.

Joomla: migrate content from Joomla 1.5 to Joomla 1.7

This article is sharing how to migrate your Joomla 1.5 content to Joomla 1.7.

As Joomla 1.5 and Joomla 1.7 come with different structure, you might found out it is difficult to upgrade your Joomla directly from application source. However, you may upgrade the content from back-end.

First of all, you need to ensure the database prefix and assume that you are using original prefix named jos_.

To backup from Joomla 1.5,
1. Log into the PHPMyAdmin.
2. Select on SQL tab.
3. Enter this query,

SELECT `title`, `alias`, `title_alias`, `introtext`, `fulltext`, `state`, `sectionid`, `mask`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `parentid`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata` FROM jos_content

4. Select on Export from bottom.
5. Click Go to save it.

To restore to Joomla 1.7,
1. Log into the PHPMyAdmin.
2. Click on the Import button.
3. Select the file and import it.

Remote MySQL Access for cPanel

By right, MySQL is one of the engine that used up lots of I/O and Memory resource from a server. Somehow you may use this scenario to setup so-called Clustering Web and MySQL server to reduce the I/O usage.

To setup remote MySQL server, you need 3 main steps as below.
1. Grant remote access to cPanel root user.
2. Add remote host information to /root/.my.cnf file.
3. Configure PHPMyAdmin configuration.

1. Grant remote access to cPanel root user,
To grant remote access to cPanel root user, you will need to amend the MySQL privilege as line below.
mysql> GRANT ALL PRIVILEGES ON *.* TO [email protected]`192.168.1.1` IDENTIFIED BY ‘password’ WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO [email protected]`mysql.mickgenie.com` IDENTIFIED BY ‘password’ WITH GRANT OPTION;

2. Add remote host information to /root/.my.cnf file,
Next, you will need to change the host of the MySQL location to the slave server.
[client]
user=”root”
pass=”password”
host=”mysql.mickgenie.com”

3. Configure PHPMyAdmin information,
Open file /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php, configure the setting as below.
$i++;
$cfg[‘Servers’][$i][‘host’] = ‘mysql.mickgenie.com’;
$cfg[‘Servers’][$i][‘port’] = ‘3306’;
$cfg[‘Servers’][$i][‘socket’] = ”;
$cfg[‘Servers’][$i][‘connect_type’] = ‘tcp’;
$cfg[‘Servers’][$i][‘extension’] = ‘mysql’;
$cfg[‘Servers’][$i][‘compress’] = FALSE;

You have done the setting.

phpMyAdmin Socket Error

If you are webmaster who using the web interface database management, you shall be familiar with phpMyAdmin.

Then you might get these error from your phpMyAdmin when you logged into the phpMyAdmin.

#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

To overcome this error, you could have 2 ways to solve the problem.

Method 1:

Check if your mysql.sock file missing from /tmp.

If it is really missing from /tmp, you may create a symbolic link from /var/lib/mysql/ to /tmp.

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

You might ask why must do this, you may check the file from /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php and you need to check for the setting of cfg[‘Server’][‘socket’],  and you will see the setting set to /tmp/mysql.sock.

Method 2:

Edit the following file.
/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

Find $cfg[‘Servers’][$i][‘host’], change the value from localhost to 127.0.0.1.

How to manually disable WordPress Plugin

Many WordPress user alway will facing WordPress appear empty page after upgrade to newer version of WordPress, 1 of the reason is due to you do not disable plugin before upgrade it.

Refer to the step below, you may disable the plugin through MySQL database(PHPMyAdmin).
1. Login to PHPMyAdmin.
2. Look to your databases(eg. mickgenie_wordpress).
3. Look to table named wp_options as browse it.

Continue reading How to manually disable WordPress Plugin