====== Installation ====== This page introduces you to the standard installation procedure. Some hosting provider-specific tutorials are available [[..:hosting/|on this page]]. **Wanted!** If you have installed Dotclear with a provider for which there is no tutorial, please feel free to contribute to the project by sending us your own tutorial, following the template, at documentation (at) dotclear.net. ===== Prerequisites ===== Before installing Dotclear 2, you should check that your web space features the following technical capabilities: * PHP 8.1 or above, with support for the following extensions: * mbstring * iconv * ob_ function support * utf8 support on preg_ functions * simplexml and domxml * SPL * GMP or BC MATH ( for ipv6 antispam filters) * One of the following supported databases: * PostgreSQL 8.0 minimum * MySQL 4.1 minimum with InnoDB * MariaDB * SQLite The database must have been created before the Dotclear installation. Be sure to have the following php settings: * MySQL, PostgreSQL or SQLite extensions activated (depending on the installed database) The GD2 php extension is useful, but it's not a requirement. If it's not present, you won't get image thumbnails in the media manager. A script is available in the [[..:hosting#test-your-hosting-provider|Hosting providers]] section for you to check that yours will support Dotclear. ===== Automatic installation ===== Using Dotclear 2's automatic installer is the easiest way to install the blog engine. It will check that PHP 5 is enabled, and if it's not, it will activate it for you. Then the files required to install Dotclear will be downloaded. You will then be redirected to the standard installation wizard to complete the process. To install Dotclear using the automatic installer: * Connect to your server through FTP * Download [[https://download.dotclear.org/loader/dotclear-loader.php|dotclear-loader.php]] to your hard drive then transfer it to your server. * Go to this file using your web browser (for example **%%www.example.com/dotclear-loader.php%%**). * You may change the installation directory and leave this field untouched if you don't know what it is. * Click on the button. If everything goes fine, you'll only have to click on the Next button to access the [[#installing-using-the-wizard|Installation Wizard]]. If you encounter any issues, you will have to use the "standard" method described below. ===== Standard installation ===== Skip this step if you used the automatic installation. You need to [[http://dotclear.org/download|download Dotclear 2 archive]], extract it then upload your files to your web space using an FTP client. If you want to be able to use the automatic update, configure your FTP client so the files are transfered in **binary mode**. Check that the read, write and execute permissions are set for the following directories and files: * the cache/ directory * the public/ directory If you're on a Unix-based system, whether Linux or Mac, you can change the permissions to 777, i.e. read, write, and execute on all. This solution will work but it provides less security. If you want to secure the permissions of your files and directories, please note that only the user and the server process need to have read, write, and execute permissions on these directories. ===== Installing using the Wizard ===== If you do not wish to create the **config.php** file yourself, you can use the configuration wizard. You simply need to go to **%%http://my-dotclear-url/dotclear/admin/install/%%**. A message alerts you that you haven't got a configuration file and offers to run the wizard. Click this link. You're presented with a form that asks you for some configuration information: * **Database type** * **Database hostname**: hostname of your database ((You may leave this field empty if the database is on 'localhost'.)) * **Database name** * **Username for the database** * **Password for the database** * **Prefix for the database tables** When you submit the form, the program checks that Dotclear's installation conditions are met, and if this is the case, the wizard takes you to the [[#fin_de_l_installation|end of the installation process]]. ===== Installing from the config.php file ===== Rename **inc/config.php.in** into **inc/config.php** and fill in the values using the following indications: * **DC_DBDRIVER**: database type ('mysql', 'pgsql' or 'sqlite') * **DC_DBHOST**: name of the database host ((You may leave this field empty if the database is on 'localhost'.)) * **DC_DBUSER**: username for the database * **DC_DBPASSWORD**: password for the database * **DC_DBNAME**: name of the database * **DC_DBPREFIX**: prefix for Dotclear tables If you're using SQLite, only fill the DC_DBNAME value field with the path to the SQLite database file. * **DC_MASTER_KEY**: insert a quite long character string of your choice. Do not ever change it. * **DC_ADMIN_URL**: full URL to the administration interface. This field is not mandatory but we suggest you enter it. * **DC_ADMIN_MAILFROM**: Email address used as sender for recovery password. * **DC_SESSION_NAME**: name of the session cookie for the administration interface * **DC_PLUGINS_ROOT**: path(s) to the plugin location(s) * **DC_TPL_CACHE**: location of the cache directory (must be writable) You may also define the constants **HTTP_PROXY_HOST** and **HTTP_PROXY_PORT** that let you specify the host and port of a proxy that will be used for all HTTP operations (pings, trackbacks, RSS feed reading, etc.) If you are using SQLite, create the database file specified by **DC_DBNAME** and make sure it's writable by the web server user (typically ''httpd'' or ''apache''). **_mail() function**: you can override the function used to send mails. The default one uses the standard php mechanism (the mail() function). If you encounter difficulties sending mails, for example if the sent mails are too often stopped by antispam filters, we recommend you to configure the mail sending functionality. For more on the subject, please refer to: [[.:install:custom-sendmail|Customizing mail sending]] ===== Completing the installation process ===== After you have created the **inc/config.php** file, you only need to go to **%%http://www.example.com/admin/install/%%** and answer the questions asked on this page. You will then get your password (a copy will be sent to you by email). Now all you have to do is start blogging :) You may be prompted a message telling you that the cache directory is not writable. In this case, change the value of DC_TPL_CACHE in your configuration file or give the necessary permissions to the relevant directory. The hosting provider-specific installation process is detailed in the [[..:hosting|Hosting providers]] section of this guide. ===== Next steps ===== ==== Multiblog ==== If you are managing several blogs with this installation, please refer to the [[.multiblog|multiblog]] documentation. ==== Blog settings ==== After finishing the installation procedure, don't forget to [[..:usage:blog-parameters|configure your blog settings]]. ===== Appendix : installing a Git copy ===== See http://git.dotclear.org/ for information about Dotclear repository If you wish to use PHP files instead of gettext language files, create them manually by starting the **build-tools/make-l10n.php** program from the root of your Dotclear copy. Don't forget to do it after every update if you want to keep a translation updated.