Skip to main content

Installation

Requirements

Cartify was built on top of the Laravel framework which has a few system requirements. You should ensure that your web server has the following minimum PHP version and extensions as follows:

  • PHP 8.1 or later
  • Mysql 8.0 or later

and the following PHP extensions (which on most systems will be installed by default):

  • BCMath PHP Extension
  • Ctype PHP Extension
  • cURL PHP Extension
  • DOM PHP Extension
  • Exif PHP
  • Fileinfo PHP Extension
  • GD PHP extension
  • Intl PHP
  • JSON PHP Extension
  • Mbstring PHP Extension
  • OpenSSL PHP Extension
  • PCRE PHP Extension
  • PDO PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension

Installing Cartify on local machine

Cartify is a powerful e-commerce platform built on the Laravel framework, offering seamless integration with PHP Built-in Webserver. To easily test Cartify on your local machine before deploying it to a server, follow these simple step-by-step instructions:

caution

Before you start, make sure you have configured the PHP executable path in your system environment variables so that you can run PHP commands from your terminal or command prompt.

  1. Extract the Cartify script that you downloaded from CodeCanyon. Right-click the downloaded zip archive and select "Extract" or use a file extraction tool. Choose a location on your computer where you want to store the script.

  2. Open the .env file using a text editor. Update the following variables to match your local environment:

    DB_DATABASE=<your-database-name>
    DB_USERNAME=<your-database-username>
    DB_PASSWORD=<your-database-password>

    Replace <your-database-name>, <your-database-username>, and <your-database-password> with the appropriate values for your database configuration.

    caution

    In many operating systems, the .env file is hidden by default to prevent accidental modifications by users. If you can't find it in the Cartify directory, make sure to enable the "Show hidden files" option in your file explorer or use text editor's "Open file" option to locate and open the file.

  3. Import the database/data/cartify.sql file into your database. You can use a tool like phpMyAdmin or MySQL Workbench to import the file.

    info

    If you prefer to utilize sample data similar to our demo setup, instead of cartify.sql you can import the sample.sql file. Please be aware that, to respect copyright restrictions, the sample data will not include any images.

Your Cartify application is now ready to be served. Start the PHP development server by running the following command:

php artisan serve

Open your web browser and visit http://127.0.0.1:8000 to access the Cartify application.

caution

If you're using a different port for your PHP development server, make sure to update the APP_URL variable in your .env file to match the port number.

By following these steps, even if you're new to this process, you can successfully set up and run Cartify on your local machine. This allows you to explore the application's features, make customizations, and test it before deploying it to a live server.

Installing Cartify on shared hosting

Shared hosting is a type of web hosting where multiple websites are hosted on a single server. In this setup, resources such as CPU, memory, and disk space are shared among the hosted websites.

It's important to note that shared hosting environments may have limitations compared to dedicated or cloud-based hosting solutions. Resource constraints and server configurations imposed by the hosting provider may impact the performance or availability of your Laravel application.

It is recommended to review your hosting plan and ensure it meets the requirements of running a Laravel application effectively.

info

There are many shared hosting providers that offer Laravel hosting plans. You can search for them on Google or other search engines. Some of the popular ones are Hostinger, A2 Hosting, and SiteGround.

To successfully install Cartify on your chosen hosting provider, follow the steps outlined below.

Step 1: Uploading Cartify to your Hosting Server

  1. Connect to your hosting server using an FTP client like FileZilla.
  2. Upload the entire Cartify directory to the root directory of your website (not inside the public_html folder).
  3. Verify that the directory structure looks like this:
|- ...
|- public_html
|- cartify
- app
- bootstrap
- config
- database
- ...

Step 2: Moving Files to the public_html Folder

  1. Open the cartify directory on your server and locate the public folder.
  2. Move all the files and folders inside the public folder to the public_html folder.
  3. After moving, the directory structure of your public_html folder should resemble this:
|- ...
|- public_html
|- build
|- img
|- favicon.ico
|- index.php
|- robots.txt
|- cartify
- app
- bootstrap
- config
- ...

Step 3: Modifying the index.php File

  1. Locate the index.php file inside the public_html folder.

  2. Right-click on the file and select Edit to open it in a code editor.

  3. Look for the following lines in the file:

    // line 34
    require __DIR__.'/../bootstrap/autoload.php';

    // line 47
    $app = require_once __DIR__.'/../bootstrap/app.php';
  4. Replace them with the following lines:

    // line 34
    require __DIR__.'/../cartify/bootstrap/autoload.php';

    // line 47
    $app = require_once __DIR__.'/../cartify/bootstrap/app.php';
  5. Save the changes and close the code editor.

Step 4: Creating a Database

  1. From your hosting control panel navigate to the Databases section and click on MySQL® Databases.
  2. Under Create a New MySQL Database And Database User, fill in the following fields:
    • MySQL database name, enter a name for your database.
    • MySQL username, enter a username for your database.
    • Password, enter a password for your database.
  3. Click on Create to create the database and user.

Step 5: Importing the Database Tables

  1. Navigate to the Databases section and click on phpMyAdmin.
  2. Select the database you created from the left sidebar.
  3. Click on the Import tab.
  4. Click on Choose File and select the cartify.sql file from the cartify/database/data folder.
  5. Click on Go to import the database tables.

Step 6: Updating the Database Configuration

  1. Locate the .env file in the cartify directory.
  2. Right-click on the file and select Edit to open it in a text editor.
  3. Look for the following lines:
    DB_DATABASE=your_database_name
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
  4. Replace your_database_name, your_username, and your_password with the appropriate values for your database configuration.
  5. Save the changes and close the file.

Step 7: Updating the Application URL

  1. Open the .env file again.
  2. Locate the line that starts with APP_URL=. It should look like this:
    APP_URL=http://localhost
  3. Replace the value after the equals sign with the URL of your website.
  4. Save the changes and close the file.

Step 8: Linking the Storage Directory

  1. Open the cartify/routes/web.php file in a text editor.
  2. Add the following line at the end of the file:
    Route::get('/linkstorage', function () {
    Artisan::call('storage:link');
    });
  3. Save the file and close the editor.
  1. Open your web browser and visit your website's URL.
  2. Add "/linkstorage" to the end of the URL (e.g., https://example.com/linkstorage).
  3. If a blank page with no errors appears, the storage directory has been linked successfully.
  4. Remove the "/linkstorage" route from the cartify/routes/web.php file.

Step 10: Moving the Storage Directory

  1. Inside the cartify/public folder, locate the storage directory.
  2. Move the storage directory to the same level as the index.php file in the public_html folder.
  3. Confirm that your public_html directory structure now looks like this:
    |- build
    |- img
    |- storage
    |- favicon.ico
    |- index.php
    |- robots.txt

That's it! You have successfully installed Cartify on your shared hosting. You can now visit your website and start using Cartify to build your store!