MLInvoice Installation

Downloadable Files

Latest Release

MLInvoice 2.1.2 (2 Apr 2023)

Latest Beta Release

MLInvoice 2.2.0 beta 1 (11 Nov 2023)

Previous Versions

MLInvoice 1.23.1 (31 Oct 2021) - Last version to support PHP 5.6

MLInvoice 2.0.3 (31 Mar 2022)

Development Version

Latest development version which may contain unfinished or not properly tested functionality, even though it is kept functional as far as possible:
MLInvoice git dev.

See the commit history for information on the latest changes. This version is not recommended for production use.
Note that the development version does not include all dependencies. You will need Composer and npm to install them. Execute the following commands in MLInvoice directory:

  php [path to ]composer.phar install
  npm install --production
If you want to modify js or scss files, run npm install without parameters. This allows you to use e.g. the command node_modules/.bin/grunt watch.

New installation

MLInvoice requires a web server with support for PHP (7.3.5 or higher) and a MySQL or MariaDB database. These can be installed on a server or locally, even on a laptop. Instructions for setting these up can be found elsewhere:

Also web hotels that provide support for PHP and MySQL, are workable solutions, but it is important to note that if secure HTTPS protocol is not used, it is possible to intercept the data transmitted over the network. Many services provide phpMyAdmin for administering MySQL databases. It can be used to easily create the database.

MySQL support and mbstring module are required in PHP. Finvoice and other XML/XSL features require also DOM/XML and XSL modules. Required minimum PHP version is 7.3.5.

When the prerequisites above are fulfilled, the actual installation can be done following the instructions below.

  1. Create a MySQL database mlinvoice. Set collation to utf8_swedish_ci or another suitable utf8 collation.
  2. Create a MySQL user with sufficient permissions (at least SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, DROP, EXECUTE, CREATE VIEW, EVENT, TRIGGER, LOCK TABLES) to use the mlinvoice database.
  3. Extract MLInvoice installation package on the web server to a suitable directory (typically e.g. htdocs directory). Ensure that the file access permissions allow execution by the web server. Read permissions to all files for the web server are enough for normal use, but write access is required for automatic update.
  4. Create the database structure by executing in the mlinvoice database the commands in create_database.sql file (found in the installation package).
  5. Open MLInvoice in the browser and enter the required initial settings.
  6. Modify settings in Settings -> General Settings.
  7. Modify print templates in System -> Print Templates and enable/disable them as required.
  8. PHP default memory limit may not be enough for PDF creation. If it breaks with a an error, increate PHP's memory_limit setting to e.g. 32M (see http://php.net/manual/en/configuration.changes.php and http://php.net/manual/en/ini.core.php#ini.memory-limit).
  9. If you're going to use Finvoice or other XML formats, ensure that DOM/XML and XSL modules are installed in PHP.
  10. Settings in config.php may need to be modified if sending email does not work by default.

Remember to backup the database regularly. MLInvoice includes a backup function which creates an SQL script from the database contents (the script is similar to what phpMyAdmin's export function creates). The database can restores to an empty MySQL database by executing the script. Make sure at times that the backup works by creating a new database, running the script in it and checking the results in MLInvoice.

Solving Problems

If, for some reason, MLInvoice does not work but complains about something or displays an empty screen, see web server and PHP logs. They may contain more information what the problem is.

Upgrading Automatically (Starting with Version 1.17)

Automatic updates are supported starting with version 1.17.0. Check the System menu. If automatic updates are not possible, the instructions below still apply.

Upgrading Manually

  1. Log out from MLInvoice.
  2. Replace files from old version with new ones but preserve existing config.php file.
    The database is upgraded automatically before the login screen is displayed, and a message about it is displayed on the login screen. If database upgrade fails e.g. due to insufficient permissions, the required steps are written to PHP's error log. Note that it may take a while to display the login screen on first run after installation depending on how many database updates need to be made.
  3. Make sure the MySQL user has the LOCK TABLES permission.
  4. If you encounter any weird behavior in the user interface after the upgrade, try clearing the browser's cache.