Powered by MediaWiki
Personal tools

Install b2evolution

From B2evolution

Jump to: navigation, search

Contents

[edit] Pre-installation

Before you begin, make sure you have:

  • a webhost that can properly support a b2evolution installation. The following programs are required:
    • PHP version 4.1 or above
    • mySQL version 3.23 or above
  • the ability to create and use a MySQL database on your webhost server. If needed, you can install b2evolution in an already existing database and you can put several b2evolution's into one database.

[edit] Installing b2evolution

  1. On your webserver/host create an empty database for b2evolution. You may call this database whatever you like. Creating the database is not done through b2evolution but through your webhost or through a program like phpMyAdmin or cPanel. It will be important later on that you remember the name of your database, as well as the user name and password you choose.
  2. Next, upload the b2evolution files to your server using an FTP program. You need to make sure that all the files in the /blogs directory and all the /blogs subdirectories get copied to the server. Those are the only essential files, although you may upload the entire package if you wish. (Note: Some hosts can install the b2evolution files for you.)
    • Keep in mind that wherever you install the /blogs directory files will become the base URL of your blog. For example, if you install to the /weblog directory of your site then your URL will be http://www.yoursite.com/weblog. If you install the /blogs directory files in your root directory your weblog will be at http://www.yoursite.com/.
  3. Once you've uploaded all the files you can set the permissions of certain key files using your ftp software. Assuming your b2evo is installed under /blogs. Here's what you would need to change:
    • chmod 666 /blogs/conf/_basic_config.php (_config.php before version 1.8) if you want the installer to be able to automatically update your config based on your input.
    • chmod 777 /blogs to allow creation of blog stub files from the admin interface or to generate static pages for your blogs.
    • chmod 777 /blogs/media in order to upload images and other media from b2evo's backoffice.
    • mkdir /blogs/media/blogs and then chmod 777 /blogs/media/blogs to allow uploading files.
    • chmod 666 /blogs/skins/custom/*.* if you want to use the template editor for the custom skin (you want to make sure the 'img' directory retains permissions of 755).
      For more information on directory and file permissions, and a list of which reported ftp clients work or struggle, you can go here.
  4. The next step is to run the built-in installer which will finalize your settings. You can run the installer by typing in your blog's address and adding /install to the end of it. For example, http://www.yoursite.com/blogs/install.
  5. Fill in your database username and password (from step 1) as well as your database name. Check that the other fields look right and then click to update the config file.
  6. Choose "New Installation" from the next screen and click "Go!"
  7. b2evo will write your config files and populate your database with some sample blogs and posts. At the bottom of this page you will see your login and password which you will use to access your new blog. Don't lose these. They can be changed later, but they are necessary now if you want to have access to your new blog.
  8. Click the "log in" link at the bottom of the page and you will be brought to the login screen. After putting in the the login and password from step 7 you will be taken to the backoffice of your new blog. In the upper right hand corner of the backoffice you can "Exit to blogs" to take a look around.

Congratulations, you did it!

[edit] After installation

[edit] Activate .htaccess files

In the /blogs folder there is a file called sample.htaccess. You should try renaming it to .htaccess (with a leading dot). This will optimize the way b2evolution is handled by the webserver (if you are using Apache). This file is not active by default because a few hosts would display an error right away when you try to use it. If this happens to you when you rename the file, just remove it again and you'll be fine.

[edit] File permissions

See directory and file permissions.

[edit] Be careful about blank lines

When you edit any of the config files, be careful not to add any extra blank lines at the start or end of the file. For some very tricky reasons, this will cause your cookies to fail where needed in the app, and you won't know why. We have spent a very looooong time figuring this out! :-/