Creating and Running a FacturaScripts Project
FacturaScripts is a powerful and flexible open-source ERP and CRM solution, ideal for small to medium-sized businesses and freelancers. With the convenient local development environment provided by ServBay, you can easily create, test, and run FacturaScripts projects on your local macOS system.
This guide will walk you through the complete process of installing and configuring FacturaScripts using ServBay.
What is FacturaScripts?
FacturaScripts is an open-source enterprise resource planning (ERP) and customer relationship management (CRM) software developed with PHP and the Bootstrap framework. It is designed to help businesses manage their core business processes, including:
- Invoice issuing and management
- Accounting
- Inventory control
- Customer and Supplier management
- Project management
- And much more...
Being an open-source project, it has an active community for support and allows users to extend and customize functionalities through plugins.
Key Features and Benefits of FacturaScripts
- Open-source and Free: No need to pay for expensive licenses, you can use and modify freely.
- Comprehensive functionality: Covers most of the core functions needed for the daily operations of small to medium-sized businesses.
- User-friendly: The interface is relatively intuitive, with a gentle learning curve.
- Highly extensible: It has a rich plugin marketplace to easily add new features or integrate with other services.
- Cross-platform: Web-based, accessible on any device that supports modern browsers.
- Active community: You can seek help from the community when you encounter issues.
- Multilingual support: Supports multiple languages, making it convenient for users from different regions.
Creating and Running a FacturaScripts Project with ServBay
ServBay provides an ideal local environment for running PHP applications like FacturaScripts. It integrates common services such as Nginx/Apache, multiple versions of PHP, MySQL/MariaDB/PostgreSQL, and offers a graphical interface for management.
The main steps to run FacturaScripts with ServBay include:
- Downloading the FacturaScripts source code.
- Creating a project folder in the directory managed by ServBay.
- Creating the MySQL database and user needed for FacturaScripts.
- Configuring the Apache web server in ServBay to point to the project directory.
- Accessing via browser and completing the FacturaScripts installation wizard.
Creating a FacturaScripts Project (Based on Downloaded ZIP Package)
This is one of the most common local installation methods.
Download FacturaScripts:
- Visit the official FacturaScripts website (https://facturascripts.com/).
- Navigate to the download section and find the latest stable
.zip
package to download.
Create Project Directory:
- Open Finder and navigate to the directory where ServBay stores web files. By default, we recommend placing it in
/Applications/ServBay/www/
. - Create a new folder in this directory to store the FacturaScripts project, for example, name it
facturascripts_project
. - Example full path:
/Applications/ServBay/www/facturascripts_project
- Open Finder and navigate to the directory where ServBay stores web files. By default, we recommend placing it in
Extract Files:
- Extract the downloaded FacturaScripts
.zip
file into the newly createdfacturascripts_project
folder. - After extraction, the
facturascripts_project
folder should contain files and directories such asindex.php
,config.php
(possibly generated after installation),Core
,Dinamic
,Plugins
, etc.
- Extract the downloaded FacturaScripts
Initial Configuration (MySQL Database Configuration, etc.)
FacturaScripts requires a database to store all data. We will use the MySQL service managed by ServBay.
Ensure MySQL Service is Running:
- Open the ServBay application.
- Select “Services” - “MySQL” from the left menu.
- Ensure the MySQL (or MariaDB) service is started. If not, click the toggle button next to it to start.
Create Database:
- You can use ServBay's built-in database management tools (like phpMyAdmin) or create the database via the command line.
- Using phpMyAdmin (Recommended):
- In the ServBay interface, find “Database” - “MySQL” and click phpMyAdmin at the top right.
- Log in to phpMyAdmin (usually using the root user and the password you set in ServBay).
- Click on the “Databases” tab.
- In the “Create Database” field, enter the database name, for example
facturascripts_db
. - Choose the appropriate character set, recommended
utf8mb4_general_ci
orutf8mb4_unicode_ci
. - Click “Create”.
- Create Database User (Optional but Recommended): For security, it is advisable to create a dedicated database user for FacturaScripts instead of using the root user.
- In phpMyAdmin, return to the homepage and click the “User Accounts” tab.
- Click “Add User Account”.
- Enter a username (for example,
facturascripts_user
). - For hostname, select
localhost
. - Generate or enter a strong password, and be sure to remember this password.
- Check “Create a database with the same name as the user and grant all privileges” or manually go to the “Database” section to grant the new user all privileges on the
facturascripts_db
database (ALL PRIVILEGES
). - Click “Execute” at the bottom of the page.
Record Database Information: Note down the information you created:
- Database Name (
facturascripts_db
) - Database Username (
facturascripts_user
) - Database User Password (the password you set)
- Database Host (usually
localhost
or127.0.0.1
) - Database Port (MySQL default is
3306
, which can be confirmed in the ServBay service list)
- Database Name (
This information will be used during the FacturaScripts installation process.
Configuring the Web Server (Based on Apache)
Now we need to tell ServBay how to serve our FacturaScripts project using the Apache service.
Ensure Apache Service is Running:
- In ServBay's “Services” interface, ensure that the Apache service is started.
Add Host:
- From the left menu in ServBay, select “Websites”.
- Click the “+” button on the right side.
- In the pop-up configuration window, fill in the following information:
- Name: Give this host configuration a descriptive name, for example,
FacturaScripts Demo
. - Domain: Enter the domain name you wish to use to access the local FacturaScripts site. For this purpose, we use
facturascripts.demo
. - Website Type: Select
PHP
, indicating that this is a dynamic PHP website. - Root Directory: Click the “Browse” or “Select” button, navigate and select the directory where you previously created and extracted the FacturaScripts files (
/Applications/ServBay/www/facturascripts_project
). - Web Server: Select
Apache
and the version of Apache you wish to use. - PHP Version: Choose a PHP version compatible with your downloaded FacturaScripts version (check FacturaScripts' system requirements, typically recommending the latest stable version, such as PHP 8.1 or 8.2).
- Other Settings: Usually keep default settings unless you have specific needs.
- Name: Give this host configuration a descriptive name, for example,
Save Configuration:
- Click the “Add” button.
- ServBay will automatically configure the Apache virtual host and may prompt you for administrator permissions to modify the system's
hosts
file to pointfacturascripts.demo
to the local IP (127.0.0.1
). Please allow this operation.
Check PHP Extensions:
- FacturaScripts may require specific PHP extensions to function correctly (such as
pdo_mysql
,gd
,intl
,zip
, etc.). - In ServBay, you can manage installed PHP extensions. Typically, the extensions that come pre-installed with ServBay are sufficient, but if the installation process indicates missing extensions, you can enable them in the PHP configuration section of ServBay.
- FacturaScripts may require specific PHP extensions to function correctly (such as
Accessing the Website
Now that everything is ready, you can start the online installation process for FacturaScripts.
Open Browser: Launch your preferred web browser (such as Chrome, Firefox, Safari).
Enter Address: Type
https://facturascripts.demo
in the address bar and hit Enter.FacturaScripts Installation Wizard:
- If everything is configured correctly, you should see the installation interface for FacturaScripts.
- Language Selection: Choose the language you wish to use.
- System Check: The installer will check your server environment (PHP version, required extensions, directory permissions, etc.) to see if they meet the requirements. If ServBay is configured correctly, everything should be green ticks here. If there are issues, please check the PHP configuration or file permissions in ServBay as per the prompts.
- Database Configuration: This is a crucial step. You need to input the database information you created and recorded earlier:
- Database Type: Select MySQL.
- Host:
localhost
or127.0.0.1
. - Port:
3306
(or the MySQL port you see in ServBay). - Database Name:
facturascripts_db
. - Username:
facturascripts_user
. - Password: The password you set for
facturascripts_user
. - Table Prefix: You can keep the default value
fs_
.
- Administrator Account: Set the administrator username, password, and email for FacturaScripts. Be sure to remember this information as it will be your credentials for logging into the backend.
- Installation: Click the install button, and FacturaScripts will create the database tables and write to the configuration file.
Installation Complete:
- Upon successful installation, you will typically be prompted to delete the
install
directory (if present and prompted for safety). - You should now be able to access your FacturaScripts login page via
http://facturascripts.demo
. Log in using the administrator account you just set up, and start exploring and using FacturaScripts!
- Upon successful installation, you will typically be prompted to delete the
Congratulations! You have successfully created and run a FacturaScripts project on your local macOS environment using ServBay. ServBay simplifies the configuration and management of the local server environment, allowing you to focus more on the development and usage of FacturaScripts itself.