Monthly Archives - November 2014

Changing wordpress wp-content folder

Add this to the bottom of the wpconfig file. where newfolder is the new name of your wp-content folder.

/* Adjust content directory to new name */
    define (‘WP_CONTENT_FOLDERNAME’, ‘newfolder’);  
     define (‘WP_CONTENT_DIR’, ABSPATH . WP_CONTENT_FOLDERNAME) ;  

Add this to the bottom of the wpconfig file.  to adjust for change in folder name ie – plugins disappearing/linkage structure.
  /* Adjust for proper url relinking after folder change*/
      define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);  
    define(‘WP_CONTENT_URL’, WP_SITEURL . WP_CONTENT_FOLDERNAME);

MIGRATING A WEBSITE

There are a few things to keep in mind when migrating a website.

 

1. base level server modifications – php.ini/modrewrite/.htaccess these all change based on your hosting provider (IE php upload time/php memory limit etc)

2. If you are running a content management system like drupal or wordpress do a Database backup through a sql tool like php myadmin, alot of cms backup tools have issues – missing tables, indexes and issues with primary keys

3. Folder permissions from old server to new server.

4. absolute linked files vs relative (important if you are moving to a new domain)

5. payload and traffic – alot of shared hosts have a very minimal capacity with burst traffic – 10,000-20,000 an hour generally will crash a co-host,  with most hosts such as bluehost, hostgator you will get your site shut off to prevent the rest of the clients on the same server from crashing.

Magento Migration

OLD ADMIN

1 – clear cache and index management (also manually the var/cache/folders)

2- backup and export database through phpmyadmin (magento backup has issues) utf8/primary key

3- backup file/folder structure

 

NEW INSTALL

1 – install blank database

2- upload file/folder structure (you may need to CHMOD new directories to their appropriate permissions on some installs)

3-  import magento backup db (NOTE: when importing through phpmyadmin make sure to UNCHECK THE PHP TIMEOUT, this will sometimes causes primary keys/indexes to break or get left out, due to sql formatting.

 

IF YOU NEED TO REINSTALL – Sometimes if you are installing an existing db you will receive “magento already installed” error…to correct, open the magento root on your server and go to app/etc folder and delete the local.xml file, it will then display the install screen.

 

WHEN MIGRATING FROM OTHER SERVER – you may have to change path url temporarily or for a new domain

UPDATE core_config_data SET value="http://whatever.com/" WHERE path="web/unsecure/base_url";
UPDATE core_config_data SET value="https://whatever.com/" WHERE path="web/secure/base_url"

URL REWRITE ISSUES - IF SET TO 1 CHANGE TO 0 TO DISABLE - RE-ENABLE AFTER INDEX/CACHE MANAGEMENT ENABLED.

4. login to magento admin and re-assign index and cache management

 

NOTES AND ERRORS: You may receive a few issues with duplicate records, primary key disappearing, template not displaying and urls not relinking properly.