Wednesday, June 4, 2014

PHP Website migration tips

For Moving (or migrating) Wordpress Website

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com', 'http://www.new-domain.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

For Moving (or migrating) Magento Website

copy all of your local files to production server
dump your magento local db and import it into your production server db

editing in new server

now on your new server you need to follow these two steps:

edit app/etc/local.xml file and change database info
in new server db,in its core_config_data table, you should find every records containing the url of your local installation, then you need to update those values;which can be found with this query:

     SELECT *

     FROM `core_config_data`

     WHERE `value` LIKE 'http://%';

edit (thanks to comments):
3. Do not forget to delete var folder contents
4. it'd better if you remove the content of app/etc/use_cache.ser too

For Drupal website

Edit the file [drupal home]/sites/default/settings.php path and edit at the section where you enter the database, location, username and password. You CAN enter the password either encrypted or not encrypted there.

Change “$base_url”  “$db_url”

Chmod your "files" folder so it is writeable chmod to 755

Double check your .htaccess and [drupal home] /sites/default/settings.php and make changes in case they are needed.

Clear cache and watchdog folder cleanup (empty)

Don’t forget to turn on performance caching, disable error logging to the screen and set up a cron job






0 comments:

Post a Comment