Moving WordPress multisite / Buddypress

Thu, Nov 18, 2010

CMS tutorials, Wordpress tutorials

Moving WordPress multisite / Buddypress

Being a wordpress lover, I always look for latest development in this superb content management system for various possibilities to build a website with various features. Nowadays i am working much on its Multisite features (Damn i love them) allowing me to unleash all the wordpress capabilities within it. Hence making it a most powerful system.

Buddypress is also one of the best social networking platform which is evolved very well over time (Poor on Support). These two systems together can rock the world in any kind of website.

Well, Today we will discuss more on a common problem that is moving WordPress-MS from your local machine to live server i.e. your domainname.com server. This entire procedure is called as “Domain Transferring”. I had seen many threads in the forums asking how to successfully move WordPress-MS to live server for a website which is having large number of blogs. So here we go guys, Follow the steps carefully and you can have your multisite moved to any domain just in 15 minutes.

If you are looking to move a regular site from domain1 to domain2. Please visit the following url it is explained well over there.

http://codex.wordpress.org/Changing_The_Site_URL

Now, We will see how you move your website from localhost to a live server doamain name.

  1. TAKE A FILE & DATABASE BACKUP!
  2. Transfer all web files and the the database to the new server
  3. wp-config.php – Open your config file and update the database connection with some other fields:
  4. /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘database name here…’);

    /** MySQL database username */
    define(‘DB_USER’, ‘your database user name here…’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘your database password here…’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘your database hostname here…’);

    $base = ‘/’;

    define( ‘DOMAIN_CURRENT_SITE’, ‘mydomain.com’ );

    define( ‘PATH_CURRENT_SITE’, ‘/’ );

  5. .htaccess – Open your .htaccess file and confirm or update the line: RewriteBase /
  6. Login to your PHPMyAdmin and open the database
  7. Open table ‘wp_options’ and adjust the fields ‘site_url’ and ‘home’
  8. Open table ‘wp_options’ and adjust the fields ‘site_url’ and ‘home’
  9. Open table ‘wp_site’ and adjust the domain and path
  10. Open table ‘wp_sitemeta’ and adjust the field ‘site_url’
  11. WordPress Multisite stores the standard WordPress tables for each blog with the incrementing prefix e.g. wp_1_ , wp_2_, wp_3_ … so you need to open up the ‘wp_*_options’ table for each and adjust the fields ‘site_url’ and ‘home’
  12. TAKE A DATABASE BACKUP!
  13. We then need to run a SQL command to update the GUID for each of the blogs incrementing the table as before:
  14. UPDATE wp_posts SET guid = REPLACE (guid,’http://localhost.localdomain’,'http://yourdomainname.com’);

  15. Repeat the above and replace ‘guid’ with ‘post_content’.
  16. Now Run your site. It must not give you any major error.

If there are any errors like :

  1. Unable to establish Database connection : you must be doing something wrong with your database connsetions. Check your database settings in wp-config.php
  2. If the site shows blank screen : Your all the template files must not be moved to the server. Check all theme files are being present in the server and are activated to be displayed on the website.

If there are any other issues facing by you then please post a comment below so that we can tackle that issue well together.

Related Posts

  1. Install WordPress on your server
  2. WordPress – “A beginners guide”
  3. Making wordpress secure
, , , , ,

5 Responses to “Moving WordPress multisite / Buddypress”

  1. RitwikUser Says:

    Hi,

    Every page in the wordpress multisite is redirecting to the page not found on server after moving the wpmu from our dev server to original server (After changing all the path in DB and files)

  2. Leo Pardo Says:

    Hi!

    In addition to these instructions, I had to replace the domain values under the wp_blogs table. This is the factor in my site that made it not work.

    Great tutorial! It helped a lot!

  3. onti Says:

    this surprisingly worked for me.
    additionally i had to alter the wp_blog table as well, which was not mentioned.

  4. Matt Northam Says:

    Just wanted to chime in and say thanks for this post.. It saved my bacon. (Along with the wp_blog table tips in the comments..). Good stuff!


Trackbacks/Pingbacks

  1. [...] On the FTP, open up the wp-config.php file just uploaded to your livesite server and make these changes to the database name, user, password in the file. (See Step 3 on this helpful walkthrough.) [...]

Leave a Reply