# Installation Steps

### Installation Steps: <a href="#installation-steps" id="installation-steps"></a>

As our product is a power pack with such huge numbers of highlights, here our installment goes with a simple process. you can check out the installation with detailed screenshots :

**Step1 :** Before start upload Quizly.zip and extract Quizly.zip file.

{% tabs %}
{% tab title="cPanel" %}
**To extract files in cPanel, you can use the File Manager tool. Here's how you can extract files from an archive using cPanel's File Manager:**

1. **Login to cPanel:** Access your cPanel account by visiting the URL provided by your web hosting provider and entering your credentials.
2. **Navigate to File Manager:** Look for the File Manager icon in the cPanel dashboard and click on it. It is usually located in the "Files" section.
3. **Select the Directory:** In the File Manager, navigate to the directory where you want to extract the files. You can click on folders to open them and navigate through the directory structure.
4. **Upload the Archive:** If the archive file is not already present in the directory, click on the "Upload" button in the File Manager's toolbar. Use the file upload feature to select and upload the archive file from your local computer to the server.
5. **Extract the Files:** Once the archive file is uploaded, locate it in the directory and select it by clicking on it. You should see options in the File Manager's toolbar, including an "Extract" option. Click on the "Extract" button to initiate the extraction process.
6. **Choose Extraction Options:** A dialog box will appear asking for extraction options. You can choose the extraction destination, whether to preserve the directory structure within the archive, and other options. Make your selections and click on the "Extract Files" button to start the extraction process.
   {% endtab %}

{% tab title="Plesk" %}
**To extract files in Plesk, you can follow these steps:**

1. Log in to your Plesk Control Panel using your administrator credentials.
2. Navigate to the "File Manager" section. This section allows you to manage files and directories within your Plesk account.
3. In the File Manager, locate the directory where you want to extract the files. You can navigate through the directory structure by clicking on the folders.
4. Once you are in the desired directory, select the ZIP file you want to extract. You can do this by clicking on the checkbox next to the file.
5. With the ZIP file selected, click on the "Extract Files" button in the toolbar at the top of the File Manager.
6. In the extraction dialog box, you can choose the destination directory for the extracted files. By default, it will extract the files to the current directory. If you want to extract to a different directory, select it from the dropdown list.
7. Optionally, you can check the "Preserve directory structure" option if you want to maintain the original directory structure of the ZIP file during extraction.
8. Click on the "OK" button to start the extraction process. Plesk will extract the files from the ZIP archive to the specified destination directory.
9. Once the extraction is complete, you should see the extracted files in the chosen destination directory.
   {% endtab %}

{% tab title="Windows" %}
**To extract files on Windows, you can use the built-in file extraction tool called "Windows Explorer" or use third-party software like WinRAR, 7-Zip, or WinZip. Here's how you can extract files using both methods:**

**Using Windows Explorer:**

1. Locate the compressed file (e.g., ZIP, RAR) that you want to extract.
2. Right-click on the compressed file.
3. From the context menu, select "Extract All" or "Extract Here" depending on your preference.
4. "Extract All" will prompt you to choose a destination folder for the extracted files.
5. "Extract Here" will extract the files directly to the current folder

4.Follow the on-screen prompts to complete the extraction process.

**Using Third-Party Software (e.g., WinRAR):**

1. Install the third-party software (e.g., WinRAR) if you haven't already.
2. Right-click on the compressed file.
3. From the context menu, select the appropriate option based on the software installed (e.g., "Extract Here with WinRAR").
4. The third-party software will open and display the contents of the compressed file.
5. Choose a destination folder to extract the files, either by specifying a folder path or by selecting an existing folder.
6. Click the "Extract" or "OK" button to start the extraction process.
   {% endtab %}

{% tab title="Ubuntu VPS" %}
**To extract a .zip file on Ubuntu VPS, you can use the `unzip` command-line tool. Here's how you can do it:**

1. Connect to your Ubuntu VPS using SSH or any preferred method.
2. Navigate to the directory where the .zip file is located. For example, if the .zip file is in the `/home/user/`Quizly directory.
3. `cd /home/user/`Quizly`or /var/www/html`
4. Once you are in the directory containing the .zip file, you can use the `unzip` command to extract its contents. The basic syntax of the command is as follows:
5. `unzip` Quizly`.zip`
6. Once you execute the `unzip` command, the contents of the .zip file will be extracted to the specified directory. You can now access and work with the extracted files as needed. If any files in server please take backup first.
7. Must check before unzip file unzip utility installed in vps. **Install the unzip Utility: Run the following command to install the `unzip` utility:**
8. `sudo apt update sudo`
9. `apt install unzip`
10. Verify the Installation: After the installation is complete, you can verify if `unzip` is installed properly by running the following command:
11. `unzip -v`

You should see the version information for `unzip` if it is installed successfully.
{% endtab %}
{% endtabs %}

**Step2 :** Create MySQL database, add a user to it with full permissions.

{% tabs %}
{% tab title="cPanel " %}
**To create a MySQL database in cPanel using the database wizard:**

1. Log in to your cPanel account.
2. In the "Databases" section, click on "MySQL Databases"
3. In the "New Database" field, enter the name you want to give to your new database and click on "Create Database"
4. In the "Add a New User" fields, enter a username and password for your new database and click on "Create User". Don't use **#** in Database Password string.
5. In the "Add User to a Database" section, select the new user and the new database you just created, then click on "Add"
6. In the "Manage User Privileges" section, choose the privileges you want to assign to the user for the specific database, then click on "Make Changes". Give user Full Privilege.
7. Your new MySQL database is now created and ready to use. You can use this new database to store your data and use it for your website or application.
   {% endtab %}

{% tab title="Plesk " %}
**To create a MySQL database in Plesk using the database wizard:**

1. Log in to your Plesk control panel.
2. Click on the "Databases" tab at the top of the page.
3. Click on the "Add Database" button.
4. Select the database type that you want to create (MySQL in this case).
5. Enter a name for your database and select the preferred database server.
6. Choose a username and password for the database user, and enter them in the appropriate fields. Don't use **#** in Database Password string.
7. Click on the "Create Database" button.
8. Once the database is created, you can use the "Webadmin" button to access the phpMyAdmin interface, where you can manage your database tables and data.
   {% endtab %}

{% tab title="phpMyAdmin " %}
**To create a MySQL database in phpMyAdmin :**

1. Open phpMyAdmin in your web browser and log in using your MySQL username and password.
2. In the main phpMyAdmin window, you should see a list of existing databases (if any). To create a new database, click on the "New" button in the top left corner.
3. On the "Create Database" page, enter a name for your new database in the "Database name" field. You can also select a character set and collation for the database, but the default options should be fine for most cases.
4. Once you've entered the desired information, click on the "Create" button to create your new database.
5. You should now see your new database listed in the main phpMyAdmin window. You can click on the name of the database to view its details and manage its tables and data.
   {% endtab %}
   {% endtabs %}

It's important to note that, you should set a strong and unique password for the user and keep it secure, also you should back up your data regularly to prevent data loss. Don't use **#** in the Database Password string.

**Setp3 : Import Database :** Open phpMyadmin in create a database and select database you created and click on Import tab and import that sql.

On Project file you will see a folder call Database in that folder you will have **"quizly.sql"** file.&#x20;

<figure><img src="https://851821020-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkfxdGRqNrOvTfSSLq2F%2Fuploads%2FUS1fc2Ce5iHAYnhzrokx%2Fimage.png?alt=media&#x26;token=44916721-a4b8-43c1-8cfa-25c0f5abf0c5" alt=""><figcaption></figcaption></figure>

**After that open .env file and on database details fill your database detail i.e. Database name, Database username, Database password, Database host.**

#### Step 4: Add database details :&#x20;

Add manually database details via **.env fill** a Laravel application, follow these steps:

* Locate the `.env` File: The `.env` file is located in the root directory of your Laravel project. Use a text editor to open the file.
* Find the Database Configuration Section: Look for the section in the `.env` file that contains the database configuration variables. It typically starts with `DB_`.
* Set Database Connection Details: Update the values of the following variables to match your database configuration:

```
Database Host = localhost 
Database Port = 3306 
Database Name = your_database_name 
Database User = your_database_user_name 
Database Password = your_database_password
```

* `DB_CONNECTION`: Specifies the database connection driver. For MySQL, use `mysql`.
* `DB_HOST`: Specifies the database server hostname or IP address. (default is localhost or 127.0.0.1).
* `DB_PORT`: Specifies the port number on which the database server is running (default is 3306 for MySQL).
* `DB_DATABASE`: Specifies the name of the database you want to connect to.
* `DB_USERNAME`: Specifies the username for accessing the database.
* `DB_PASSWORD`: Specifies the password for the database user.
* Save the Changes:  Save the `.env` file after updating the database configuration.

**That's it you done the installation ! open the domain eg:&#x20;**<mark style="color:blue;">**yourdomain.com/public**</mark>**&#x20;and you will see the login page.**

{% hint style="info" %}
to run website use : <mark style="color:blue;">**yourdomain.com/public/**</mark>
{% endhint %}

{% hint style="success" %}
*<mark style="color:green;">to remove public from URL:</mark>*  [*<mark style="color:blue;">https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs#remove-public-from-url</mark>*](https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs#remove-public-from-url)
{% endhint %}

**Default admin Login Details is:** <mark style="color:blue;">**yourdomain.com/public/login**</mark>

{% hint style="success" %}
**Username:** <admin@mediacity.co.in>&#x20;

**Password:** 123456
{% endhint %}

## FAQ'S

{% hint style="danger" %}
**419Error:** [**https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs#id-419-error**](https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs#id-419-error)
{% endhint %}

{% hint style="danger" %}
**Note :** If showing an **error 500** then check error via debug true: <https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs#internal-server-error>
{% endhint %}

{% hint style="danger" %}
**Note :** If showing an **error 500** in reset password, New User Registration and Payment Gateways then must check your mail setting. Reset password, New User Registration , and Payment Gateways error show due to you forget to add mail details or wrong mail details. also check error via debug true:<https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs#internal-server-error>
{% endhint %}

{% hint style="danger" %}
**The Web Site Just Showing a Blank White Page** Blank white screen due to you give space in app name and mail from the name. Go to .env file and remove space and special characters in the app name and mail from the name.
{% endhint %}

**For more Installation FAQ's :**[**https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs**](https://mediacitydocs.gitbook.io/quizly/faq/installation-faqs)
