Manual installation on Windows

This page describes the installation of various components needed to run Dolibarr on a Windows environment.

The installation has been done on Windows 10 but should be functional for earlier versions of Windows - some screenshots just won't fit.

If you are a beginner, please note that the section Installation - Update With DoliWamp (Windows .exe package) also discusses automated installation with DoliWamp.


The interest to install by yourself the different "Server" components needed for Dolibarr to work properly is the possibility to choose newer versions than those proposed by the DoliWamp installer.

It is also an excellent way to understand how it works and to deepen your knowledge about deployment and maintenance of a Dolibarr instance.


This documentation page has been written with the goal to be understandable to the largest number of people (whatever the computer level). Some precisions could appear as trivial for some people but will certainly be useful for others. If you are a (great) beginner, don't try to go fast and take the time to read the different sections of the page carefully (allow a big half-day for implementation).


In the following page, it has been tried as much as possible to explain the different actions you are going to perform (the aim being to understand and not to copy/paste or mechanically apply instructions). In order to easily distinguish the explanations from the actions to be performed, please note that all the actions to be performed are preceded by a bullet (•).


Dolibarr Architecture

Dolibarr is a Web software of type "Client/Server.

So it requires a 'Web Server with scripting language PHP and a Relational Database Management System to work.

 
Dolibarr Client/Server Architecture


Functioning

On the "Client" side, you use a Internet browser (Firefox, Chrome, Opera, Internet Explorer, etc.) to access the Dolibarr interface by typing the address of the Web Server.

As soon as you type address to which Web Server answers (for example http://localhost/dolibarr), it will try to display main page of sub directory Dolibarr (according to Web Server configuration, main page of a directory - also called index page - can be for example index.html, index.htm or index.php).

Generally, by default, the Web Server will be configured to recognize only index.html files as index files but we will see together how to add index.php files.

The files .php being script files written in the PHP language, they will not be directly understandable by the browser of the "Client" which is only able to display HTML.

So we will have to tell the Web Server that when it encounters a file with the extension .php, it will have to use its module mod_php to interpret (or convert if you prefer) the PHP code into HTML code before sending it back to the "Client" (i.e. the browser).

Finally, we also need to install a Relational Database Management System, here MariaDB to store Dolibarr data (it's Dolibarr PHP scripts that will interact with the RDBMS to write or read data from it).

Installing and configuring MariaDB

First we will install the MariaDB database server.

Download MariaDB

  • Go to the MariaDB download site and click on the green button Download xx.x.x.xx Stable now! (normally the second green button on the page).
  • In the right column, to filter the available files :
  • Click on the link to download the only file now displayed in the list.

Install MariaDB

At this level, MariaDB is now installed and started. As a Windows "Service" has been created, the RDBMS will be automatically started at each (re)startup of the computer.

Installing and Configuring PHP


Download PHP

  • Please visit https://windows.php.net/download
  • In the list of proposed downloads, take the latest Thread Safe version of PHP corresponding to your architecture (x64 if your system is 64 bits or x86 if your system is 32 bits).
    • This is normally the second proposed download (Warning ! Be careful to download the Thread Safe version and NOT No Thread Safe').
  • Once you have found the right version, download the file by clicking on the link Zip.


Extract the archive to install PHP

  • Once downloaded, right click on the archive and select Extract all....
  • Indicate C:\php as the destination path and click Extract.



Configure PHP

Now that PHP is uncompressed in the right place, we'll configure some settings.

PHP is delivered with extensions and Dolibarr needs that some of these extensions are enabled (they are not enabled by default).

Enable Display of Filename Extensions
  • In the Windows File Explorer, click on the View tab and check the File Name Extensions checkbox in the Show/Hide group.
 
Enable Display of File Name Extensions.
Create PHP configuration file from template

To customize your PHP installation, you will have to modify the php configuration file (the file php.ini).

  • Go to the folder where you unpacked PHP (C:\php) using the File Explorer Windows > Local Disk (C: ) > php (if you had checked the Show extracted folders when done box when extracting the archive, the Windows File Explorer should already be open in the right place).

In this folder containing the PHP files, you will find two configuration files "template" php.ini-development and php.ini-production.

  • Make a copy (right click, Copy) of the file php.ini-production and paste it in the same directory (right click, Paste).
  • Rename the copied file (php - Copy.ini-production) to php.ini (right click, Rename on the file).

When validating the new filename, Windows will warn you following the modification of the file extension (you must answer Yes to this question to validate the renaming of the file).

 
Windows warning when changing file extension.


Activate PHP extensions needed for Dolibarr

Double-click on the file php.ini to open it in Notepad Windows and thus be able to modify it.

Scroll through the file to find the section starting with Dynamic Extensions framed by ; (about halfway through the file) :

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

In this section, you will need to remove the ; in front of some of the extensions to load them (change for example ;extension=gd2 to extension=gd2).

Remove the ; in front of the lines ;extension=curl, ;extension=gd2, ;extension=intl, ;extension=mysqli, ;extension=mbstring, ;extension=imap.

Modify some other PHP parameters

Tip : To easily find a parameter in the file php.ini, you can use the Search function of the Notepad Windows (menu Edit > Search or Ctrl + F). Enter your search then click on Next. Depending on your position in the file, feel free to reverse the direction of the search by selecting the option Top instead of Bottom in the frame Direction then click again on next to search in the opposite direction of the file.

 
The Search dialog box allows you to search a text in the file.


Set the time zone

Below the section :

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

Under the sub-section [Date], replace the line ;date.timezone = with date.timezone = Europe/Paris (don't forget to remove the ; at the beginning of the line).

Increase the size of files that can be uploaded

By default, files that can be uploaded on server through button Browse... of Dolibarr forms (PDF bank statements, supplier invoices, etc.) are limited to a size of 2M.

If you want, you can increase this limit by modifying these lines :

  • replace line upload_max_filesize = 2M by upload_max_filesize = 16M for example ;
  • if you choose a value greater than 8M for upload_max_filesize, you will also need to replace post_max_size = 8M by post_max_size = 16M.


Save the file (File > Save or Ctrl + S) and close it.

We have now configured PHP.

Installing and configuring Apache2

Download Apache2


Extract the archive to install Apache2

Unlike installing PHP, we will proceed slightly differently for decompressing the Apache2 archive.

Instead of extracting the entire archive, we will only extract the folder Apache24.

  • To do this, start by double-clicking on the archive httpd-x.x.xx-winxx-VSxx.zip to open it in the Windows File Explorer.
  • Open the Windows File Explorer again and go to the Local Disk (C:).
  • Drag the folder Apache24 from the archive to the Local Disk (C:).
 
Decompress Apache2 by dragging the Apache24 folder to the Local Disk (C:)

This is followed by a copy of files (longer this time than for PHP) corresponding to the decompression of the archive in the Local Disk (C:).

 
Copy files from the Apache2 archive to the Local Disk (C:)

Configure Apache2

Now that Apache2 is uncompressed, we will need to change some parameters in its configuration file.

  • With the Windows File Explorer, go to the Local Disk (C:) and then to the Apache24 directory. Finally, go to the conf directory.
  • Double-click on the file httpd.conf to open the file with the Notepad Windows and thus modify the configuration file of Apache2.
Type the hostname of the Web Server
  • Search for the line #ServerName www.example.com:80 and replace it with ServerName localhost:80.
Treat the files index.php as index files
  • Look for the block
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

and replace it by

<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

So when we access a directory, Apache2 will first look for a index.php file before looking for a index.html file.

Interpreting *.php files

You remember, at the beginning, in the introductory section about Dolibarr architecture, I told you that browsers (Firefox, Chrome, Internet Explorer, etc.) that we use can understand and display only Web pages written in HTML language. So we must tell Apache2 to interpret (convert) files *.php into HTML code understandable by browsers.

  • At the very end of the file httpd.conf, skip a line and paste the following block of code to tell Apache2 to interpret the files *.php :
LoadModule php7_module "c:/php/php7apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
  • This will tell Apache2 to use the php7_module provided with PHP that we installed earlier to interpret the *.php files.
  • Save the file httpd.conf (File > Save or Ctrl + S) and close it.

Copy the files needed for the PHP extensions intl and curl into the bin/ directory of Apache2

PHP's intl extension is responsible for the internationalization (translation management) functions of the software that uses it. The PHP extension curl allows to make requests (contact) to external servers.

Dolibarr requires extensions intl and curl and these extensions need some libraries (function files) to work.

These libraries are provided with PHP, but since we use php7_module with Apache2, we need to copy these files from PHP directory to bin/ directory of Apache2 so that extensions intl and curl can work properly.

  • With the File Explorer Windows, go to the Local Disk (C:) then to the php directory (C:\php).
  • Select the files icudt65.dll, icuin65.dll, icuio65.dll, icuuc65.dll, libcrypto-1_1-x64.dll, libssl-1_1-x64.dll and libssh2.dll by clicking on the first file, then while holding the Ctrl key on your keyboard, select the other files by clicking on them.
  • Copy the files (right click, then Copy or Ctrl + C).
  • With the File Explorer Windows, go to the Local Disk (C:) then in the directory Apache24 and then in the sub directory bin (C:\Apache24\bin).
  • Paste the files (right click, then Copy or Ctrl + V).


Create and start the Windows "Service" to automatically launch Apache2

In the first part of this documentation, when we installed the RDBMS MariaDB, remember, there was a page in the installation wizard that proposed to create a Windows "Service" and customize its name.

"Services" are very handy and allow you to automatically start a software when you (re)start your computer. Contrary to the startup folder, "Services" are executed even before opening a Windows user "Session".

We will therefore create a Windows "Service" to automatically start Apache2 when the computer is (re)started.

  • Next to the Windows button that opens the start menu, in the search box "Type here to search", click then type cmd. In the list of proposed options, choose Run as administrator then validate the User Account Control window.
 
Execute Command Prompt Windows as administrator
  • Enter the following command in the Windows Command Prompt and validate with the Enter key :
C:/Apache24/bin/httpd.exe -k install
 
Creating the Windows "Service" with the Windows Command Prompt running as administrator.

The "Service" we just created hasn't started yet, so we need to start it for the first time (it will then be started automatically each time the computer is (re)started).

  • Enter the following command in the Windows Command Prompt and validate with the Enter key :
net start Apache2.4
 
Starting the Windows "Service" Apache2.4 with the Windows Command Prompt running as an Administrator

If the service doesn't start correctly, it's because your configuration file httpd.conf is invalid.

To determine the cause of your error if any, you can enter the following command in the Windows Command Prompt :

C:\Apache24\bin\httpd.exe -n "Apache2.4" -t

This command tests the validity of your httpd.conf file and should return the line where the error is encountered.

In addition to common syntax errors due to carelessness, one of the most common errors is the absence of the file C:\php\php7apache2_4.dll. This file is indeed missing if you have downloaded the wrong version of PHP (No Thread Safe) instead of the Thread Safe version. In this case, download the good archive (Thread Safe) and perform the #Extract_the_archive_to_install_PHP part again.

Another problem that can be encountered is the impossibility to start Apache2 because the port 80 is already used by another program. See the appendix What are "Listening Ports" and how to know if a program already occupies a specific port? for instructions on how to proceed.

Once you have corrected any errors, try again to start the Apache2.4 Service with the command mentioned above.

You can now close the Windows Command Prompt.

Apache2.4 is now installed as a Windows "Service" and started. The Apache2 "Web Server" will therefore be started automatically each time the computer is (re)started.

Check that everything's working

Before continuing (the installation of Dolibarr), let's take a moment to verify that our current installation works properly.

Check if the RDBMS MariaDB works properly

  • Beside the Windows button to open the start menu, in the search box "Type here to search", click and then type mysql client. In the list of options on the right, choose "Open" or click on the full title of the software to launch it (MySQL Client (MariaDB 10.4 (x64)).
 
Run the software MySQL Client (MariaDB 10.4 (x64))

.

The MySQL Client (MariaDB 10.4 (x64) software is launched.

This is a command prompt specific to your RDBMS MariaDB allowing you to execute database commands (in SQL language).

  • Enter the password of the database administrator that you chose during the installation of MariaDB previously (in the fourth screen of the installer) then press Enter to validate the password.
  • Enter the SQL statement SHOW DATABASES; to list the current databases then press Enter to validate the command.

MariaDB should answer you with the list of databases automatically created during installation: information_schema, mysql, performance_schema and test.

 
List of databases managed by the RDBMS MariaDB installed on our computer.

This concludes our test of MariaDB's functionality.

We were indeed able to successfully connect to the RDBMS with the administrator password we had previously chosen and the execution of an SQL statement ( SHOW DATABASES; ) worked correctly.

You can now close the software MySQL Client (MariaDB 10.4 (x64).

Check if Apache2 works properly

  • Start your favorite Web Browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and enter the address http://localhost in the address bar then validate with Enter.

If you have correctly installed Apache2, the "Web Server" should answer you a nice It works!.

 
The Web Server default page 'Apache2.

This concludes our Apache2 test.

We were indeed able to get a response from the Web Server Apache2 (in this case It works!) which proves that it was correctly installed and started.

You can now close your Web Browser.

Check if PHP works properly

Concerning the PHP part, we have two things to check.

  1. The files index.php are correctly recognized when accessing a directory.
  2. The files *.php are correctly interpreted by PHP and return HTML.
  • With the Windows File Explorer, go to the Local Disk (C:) then in the directory Apache24. Finally, go to the htdocs directory (C:\Apache24\htdocs).

You will find in this folder a file index.html. This is the famous file which contains <html><body><h1>It works!</h1></body></html> is the HTML answer which was sent back to us Apache2 when we accessed the server by typing the address http://localhost.

  • In the folder htdocs (C:\Apache24\htdocs), create a new folder test (right click, New > Folder).
  • Double-click on the new folder test to enter it.
  • Create a new file index.php (right click, New > Text Document).
  • Open the document with the Windows Notepad (right click, Open with > Notepad; if Notepad is not proposed, click on Choose another software, then on More software and select Notepad in the list before validating with OK).
  • Enter the following PHP code in the file :
    <?php
    phpinfo();
    
  • Save the file index.php (File > Save or Ctrl + S) and close it.

When PHP processes a file, it looks for the opening and closing tags (?php and ?) that delimit the code it must interpret. ?php thus allows to indicate that we are going to write PHP code.

The function phpinfo displays a lot of information about the configuration of PHP, which will allow us to check that PHP works and that we have activated the right extensions.

  • Start your favorite Web Browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and this time enter the address http://localhost/test in the address bar then validate with Enter.

Apache2 should return a page generated by PHP containing all the configuration information. If you scroll this page, you should see sections related to the extensions we loaded previously (including curl, gd2, intl and mysqli). If one of these sections is not displayed, it means that the extension is not loaded (so you forgot to remove a semicolon in front of an extension name when editing the C:\php\php.ini or you forgot to copy one of the files mentioned in Copy the files needed for the PHP extensions intl and curl to the bin/ directory of Apache2. Check and correct if necessary your omissions and then restart the Service Apache2.4 so that your changes are taken into account (see appendix How to manage Windows "Services" ? to know how to restart an existing Service).

[[File:Phpinfo().png|border|none|thumb|750x750px|Apache2 returns the page with the configuration information generated by PHP.] <This concludes our test of PHP.

We were indeed able to verify that PHP works correctly because it returns the information related to its current configuration.

Moreover, the files PHP index.php are well interpreted as index files because our file was well executed by typing http://localhost/test (we did not need to type http://localhost/test/index.php ).

  • With the Windows File Explorer, go to the Local Disk (C:) then to the Apache24 directory. Finally, go to the htdocs directory (C:\Apache24\htdocs).
  • Delete the folder test that we previously created.

You can now close the Windows File Explorer and your Web Browser.

Dolibarr installation

It's party time (get out the balloons and cotillions), the moment you've been waiting for so long has finally arrived! We will finally be able to install Dolibarr.

Download Dolibarr

Create folder documents of Dolibarr

Dolibarr needs a folder documents in which it stores generated documents (Sales proposals, Orders, Invoices, Intervention sheets, Delivery notes) but also documents uploaded by user (Account statements, Supplier invoices, etc.).

For security reasons, it is preferable to create the folder documents outside the Web Server (for us Apache2).

  • With the WindowsFile Explorer, go to the Local Disk (C:).
  • Create a new folder dolibarr then double click on it and create again a folder documents. So we get the directory C:\dolibarr\documents

Extract Dolibarr archive

To extract Dolibarr archive, we will proceed in a similar way as Apache2 using drag and drop technique.

  • With Windows File Explorer, go in Local disk (C:) then in directory Apache24. Finally, go to the htdocs directory (C:\Apache24\htdocs).
  • Create the folder dolibarr then double click on it.
  • Double-click then on the Dolibarr archive you just downloaded to open it in a new window of the Windows File explorer.
  • Browse in the archive to folder dolibarr-xx-x-x then to folder htdocs.
  • Select all the files in the folder htdocs by using the Select all button of the Select group of the Home tab of the Windows File Explorer (or by using the keyboard shortcut Ctrl + A).
  • Drag the selected files to the folder dolibarr created previously (in the other window).
 
Extract htdocs directory of Dolibarr archive in the dolibarr directory of Apache2 Web Server.

Because of the large number of files provided with Dolibarr and depending on the speed of your hard drive or SSD, decompression can take several minutes.

 
Decompression of Dolibarr archive to directory dolibarr of Apache2 Web Server.


Install Dolibarr

  • Start your favorite Web browser (Firefox, Google Chrome, Opera, Brave, Vivaldi, Internet Explorer, Edge, etc.) and enter the address http://localhost/dolibarr in the address bar then validate by Enter to start Dolibarr installation.
Configure the database

To make the explanations simpler, I have numbered the different fields you need to modify.

0 - Check the box Create the database.

1 - Fill dolibarr as identifier (this user will be created in MariaDB by Dolibarr installer and will have only the authorization to access the newly created dolibarr database).

2 - Fill in a different password (that you have never used, and will be specific to the MariaDB user dolibarr)

3 - Check Create owner or assign him rights to the database (this asks Dolibarr installer to create new MariaDB user named dolibarr that we filled if above with specified password).

4 - Enter root (this is the MariaDB user id of the database administrator with all rights).

5 - Enter the MariaDB password of the database administrator that you chose when you installed MariaDB (screen 4 of the installation).


Terminate Dolibarr configuration

Now that Dolibarr is successfully installed, we must finish initial setup (it is about filling your company information and activating one or more modules to use).

  • Fill your username and password and click Login.

You are automatically redirected to page Configuration of Dolibarr because initial setup is not finished.

  • In left menu, under Configuration, click on Company/Organization and fill information about your company then click on Save at the bottom of page.
  • Always in the left menu, then click on Modules/Applications and activate the desired modules by clicking on the icon representing a switch at the end of the line.

We have now finished initial configuration of Dolibarr. Bravo !

  • Click on My dashboard to display Dolibarr startup page.
 
The page My dashboard of Dolibarr. It currently presents warnings because we didn't create a file install.lock and that Dolibarr configuration file (conf.php) is writable by Web Server.
Create file install.lock

The file install.lock is important, since it prevents that anyone can restart Dolibarr installation by accessing http://localhost/dolibarr/install.

If you only use Dolibarr on your computer and that this one is not accessible from network (local or Internet), it is not necessarily necessary to create the file but it is a good habit to take because you may have to "open" your Dolibarr installation later.

  • With Windows File Explorer, go in Local disk (C:) then in directory dolibarr. Finally, go to the directory documents (C:\dolibarr\documents).
  • Create a file install.lock (right click then New > Text document).
  • In your Internet browser, click again on link My dashboard in left column of Dolibarr and see that first warning about missing file install.lock has disappeared.
Restricting Web Server write access to the file conf.php
  • With the File Explorer Windows, go to the Local Disk (C:) then to the directory Apache24. Go to the htdocs directory then to dolibarr and finally to conf (C:\Apache24\htdocs\dolibarr\conf).
  • Right click on the file conf.php and select the option Properties.
  • In the dialog box Properties of: conf.php, check the box Read only for the option 'Attributes then click OK.
  • In your Internet Browser, click again on link My dashboard in left column of Dolibarr and see that second warning related to write accessibility to Web Server of file conf.php has disappeared.
  •  
    Enable attribute Read only for main configuration file conf.phpof Dolibarr.
    .


Appendix

What are "Listening Ports" and how do I know if a program already occupies a specific port?

What's a "listening port"

When you install a "Server" program, you must choose a port on which the program will be available and which will be used by the "Client" program to communicate with the "Server". The port is therefore the communication channel between the "Client" and the "Server" (remember the architecture diagram at the top of the page).

The default port used by the MariaDB Database Server is 3306.

The default port used by the Web Server Apache2 to communicate with the "Client" (your Internet Browser) is the port 80.

If other programs already use either port 3306 or port 80, you will need to choose another port on which the Database Server MariaDB or the Web Server Apache2 will be available.

How do I know if a program is already occupying a specific port?

If you try to install the Database Server MariaDB or the Windows "Service" of the Web Server Apache2 on a port which is already occupied by another program, you will encounter an error.

To check which program is listening on which port, you can use the Windows Resource Monitor.

  • Next to the Windows button to open the start menu, in the Type here to search box, click and type resource monitor. In the list of options on the right, choose "Open" or click on the full title of the software to launch it (Resource Monitor).
 
Run the Resource Monitor software application of Windows
  • In the Resource Monitor, click on the Network tab.
  • In the Listening Ports section, sort the column Port to be able to search more easily.
  • In the Port column, search for the port you are interested in (for example 80 for the standard port of the Web Server Apache2 or 3306 for the Database Server MariaDB).
 
A program "listen" already on port 80, it is httpd.exe (i.e. Apache2).

If you can't find a line for the port number you are looking for, then that's fine (this means that no program is listening on that port and therefore it is available).

If, on the other hand, you find a match, then a program is already listening on this port and you will have to choose another listening port when you install your server.

Choose another port than the default 3306 for MariaDB

On the fifth page of the MariaDB installer, enter another port in the box TCP port: (eg 3308 - but make sure the port you choose is not already in use using the technique specified above).

After you change port for MariaDB, when you install Dolibarr, when you enter port in section Dolibarr database, don't forget to enter the replacement port you chose instead of standard port 3306.

Choose another port than the default 80 for Apache2

When customizing the Apache2 configuration file, replace the line ServerName localhost:80 by ServerName localhost:<my_port> to specify another port (for example ServerName localhost: 8080 to use port 8080 - but make sure the port you choose is not already in use by using the technique specified above). You will also need to replace the 80 of the Listen 80 : line with the port number you choose.

After changing the listening port, you will need to specify the port in the addresses you type in your browser: for example http://localhost:8080, http://localhost:8080/test, http://localhost:8080/dolibarr, etc. instead of http://localhost, http://localhost/test, http://localhost/dolibarr.

How to manage Windows "Services"?

We have seen in this documentation the creation of Windows "Services" allowing to start automatically the Database Management System MariaDB and the Web Server Apache2 at the (re)startup of the computer.

Windows is delivered with a software allowing to manage graphically the "Services". It is thus possible to consult their status (started, stopped) and to act on them (start, stop, restart).

  • Next to the Windows button allowing to open the start menu, in the search box "Type here to search", click then type services. In the list of options on the right, choose "Open" or click on the full title of the software to launch it (Services).
 
Run the Services application of Windows
  • Find the Service for which you want to check the status or perform an action (start, stop, restart) in the list of Services that appears. For example, search for MariaDB or Apache2.

In the column Status, you can check the current status of the Service (on the screenshot below, we see that the service Apache2.4 is Running, ie it is started).

  • Right click on the Service to manage to display the context menu and then select the action to perform (Start, Stop or Restart).
 
Restart the Apache2.4 service


How do I know if my computer is running 32-bit or 64-bit version of Windows?

Windows 10 and Windows 8.1
  1. Select the button Start, then Settings > System > About.
  2. On the right, under Device Specifications, see System Type.
Windows 7
  1. Select the button Start, right click on Computer, then choose Properties.
  2. Under System, see the type of system.

Reminder of the different installation directories used

Component/Software Installation path
MariaDB C:\Program Files\MariaDB 10.4
Apache 2.4 C:\Apache24
PHP C:\php
Dolibarr (program) C:\Apache24\htdocs\dolibarr
Dolibarr (documents) C:\dolibarr\documents
Dolibarr (datas) C:\Program Files\MariaDB 10.4\data\dolibarr

⚠️ Warning! The files present in the directory C:\Program Files\MariaDB 10.4\data\dolibarr are the physical files of the database. Saving these files will only allow you to reuse them with the same version of the database. A more robust way to perform a database backup is to perform an export using for example the tool mysqldump.

How to save my manual installation

In Dolibarr, three things are important to save :

  • The database (MariaDB), which contains all your entries (business proposal lines, invoices, etc.).
  • the folder documents which contains PDF documents generated by Dolibarr (commercial proposals, invoices, etc.) as well as uploaded ones.
  • the configuration file conf/config.php that contains connection parameters to your database and other configuration information.
Backup the database

There are several ways to back up the database.

Directly from Dolibarr
 
Backup of the database from Dolibarr

Once connected to Dolibarr,

  • Select the menu Backup in the Administrative Tools,
  • In Compression, select - for simplicity - None (Windows does not include a standard utility to decompress Gzip files but you can activate it if you have for example 7-Zip, PeaZip, WinZip or WinRar).
  • Click on Generate Backup.


 
Download database backup

Once the backup has been generated, you can download it by clicking on the link of the file in the right section Existing database backup files.

Manually using the HeidiSQL graphics tool

During the installation of the Database Management System MariaDB, the graphical tool HeidiSQL was also installed.

  • Next to the Windows button to open the start menu, in the search box Type here to search, click and type heidisql. In the list of options on the right, choose "Open" or click on the full title of the software to launch it (HeidiSQL).
 
Run the HeidiSQL software

We will now define the connection to our Database Management System MariaDB using the connection information we have.

 
Exporting the database with HeidiSQL
  • Right click on the database dolibarr and select Export database to SQL...


 
Set up the database export in HeidiSQL software
  • Check the box Remove/DROP in the section Table(s): then, in File name: choose the path where you want to export the backup and the name of the file. If you followed all installation documentation, a good practice is to place export at the same place as when you realize it with Dolibarr interface (method of above paragraph): C:\dolibarr\documents\admin\backup\%db-%date.sql . %db will be replaced automatically by database name (dolibarr) and %date by date and hour of export.
  • Click on Export to launch the export.


Manually using the Windows Command Prompt
  • Next to the Windows button to open the start menu, in the search box "Type here to search", click and type mariadb. In the list of options on the right, choose "Open" or click on the full title of the software to launch it (Command Prompt (MariaDB 10.4 (x64))).
 
Start the Command Prompt (MariaDB 10.4 (x64))

Command prompt is launched; go to directory Dolibarr database backups (in our folder documents) :

cd C:\dolibarr\documents\admin\backup

Enter the following command to save the database where dolibarr-2020-05-20-14-30.sql will match the name of the exported file (you can of course put whatever you want) :

mysqldump -u root -p --opt dolibarr > dolibarr-2020-05-20-14-30.sql

You will be prompted to enter the database administrator's password that you chose when you installed MariaDB (screen 4 of the installation wizard).

Save the folder documents and the configuration file config.php

ℹ️ The writing of this section is not yet complete. Please come back later.

Directly from Dolibarr

ℹ️ The writing of this section is not yet complete. Please come back later.

Manually using Windows File Explorer

ℹ️ The writing of this section is not yet complete. Please come back later.

Restore a backup

ℹ️ The writing of this section is not yet complete. Please come back later.

Manually using the HeidiSQL graphics tool

ℹ️ The writing of this section is not yet complete. Please come back later.

Manually using the Windows Command Prompt

ℹ️ The writing of this section is not yet complete. Please come back later.