Friday, September 3, 2010

installing wp 3.0.1 and activating multi sites

Activating multi sites are much more tougher in wp 3 than it was in wpmu

from wordpress has terrible instruction on its download page

so when you download the zip files
upload it to your server
uncompress it into a folder

if you go to your wp install
you will see the error

There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

you need to goto the cpanel into the folder and
Rename the wp-config-sample.php file to wp-config.php.

after renaming the file
when you go to the folder you will see
Error establishing a database connection

why? because you need to again to the wp config file and add your database details.

in your cpanel go to msql databases and
create a database
create a user and password for the user
attach the user to the database

you will now need to add these details to wp-config.php

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database name usually xyz_name you created');

/** MySQL database username */
define('DB_USER', 'usually xyz_(name you created)');

/** MySQL database password */
define('DB_PASSWORD', 'password you created or generated');

add salt
get salt keyes from
get the auto keys
and add it to your wp config
save the file

login into your wp install
goto the admin panel
goto tools>network ( wp-admin/network.php)

click on create directories

when you do this wp will auto generate some code which you need to add to
wp-config.php and .htaccess

Add the following to your wp-config.php file in /home/root/public_html/folder/ above the line reading /* That’s all, stop editing! Happy blogging. */:
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/inde/';
define( 'DOMAIN_CURRENT_SITE', '' );
define( 'PATH_CURRENT_SITE', '/site folder/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

ok in my wp-config there is NO line which says /* That’s all, stop editing! Happy blogging. */
this comes above the line which says
/** Absolute path to the WordPress directory. */
you need to add it before /** Absolute path (it will not work if you add it at the bottom of the file)

I found .htaccess was not needed to make it work - but it is good to follow all the instructions

ok now i DO NOT see the .htaccess under the sub folder
so you have to create a new .htaccess file

RewriteEngine On
RewriteBase /site folder
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

define( 'SUBDOMAIN_INSTALL', false );

it is easier to have it to false and work with sub directories than work with sub domains

No comments:

Post a Comment