# 🗂️ File Structure

## Overview

Everything the plugin writes lives in plugins/PhoenixShop.

```
plugins/PhoenixShop/
├── shops/
│   ├── shop.yml
│   └── shop/
│       ├── blocks.yml
│       └── valuables.yml
├── menus/
├── translations/
├── addons/
├── exports/
├── backups/
├── layout-sessions/
├── data/
│   └── database.db
├── config.yml
├── settings.yml
├── chest-shops.yml
├── auction-house.yml
├── discord.yml
└── pricing.yml
```

## Folders

| Folder              | Contents                                                                                           |
| ------------------- | -------------------------------------------------------------------------------------------------- |
| **shops**           | One file per shop, plus a folder of the same name holding one file per category. See [Shop Configuration File](shop-configuration-file.md). |
| **menus**           | The menu layouts: one folder per shop under `shops`, the Auction House menus under `auction-house`, and the shared menus. See [Customize Menus](customize-menus.md). |
| **translations**    | The language file. See [Languages & Translations](languages.md).                                   |
| **addons**          | Add-on jars, and a folder per add-on with its own settings. Drop a new add-on here and restart.    |
| **admin\_signs**    | Sign shops from an older version. They are moved into the database on first start and the folder is renamed **admin\_signs.migrated**. |
| **exports** ⭐      | Purchase history exported with `/pshop history export`.                                            |
| **backups**         | A copy of a file taken before the plugin rewrote it. See the note below.                          |
| **layout-sessions** | The inventory of an admin editing a menu layout, kept so it is given back after a crash. Never edit this by hand. |
| **data**            | The SQLite database, `database.db`, when SQLite is used. It holds every player shop, sign shop and shop stand. While the server runs, SQLite keeps two more files next to it, `database.db-wal` and `database.db-shm`, with the latest changes. Older versions kept it in the main folder; it is moved here on the first start. |

## Files

| File                  | Contents                                                                                |
| --------------------- | --------------------------------------------------------------------------------------- |
| **config.yml**        | The main settings and the database connection. See [Main Configuration](main-configuration.md). |
| **settings.yml**      | Transactions, menus, locked categories, the IP limit and sign shops. See [Settings File](settings-file.md). |
| **chest-shops.yml**   | The chest shop settings. See [Player Shops Settings](../main-features/player-shops/settings.md). |
| **auction-house.yml** | The Auction House settings. See [Auction House](../features/auction-house.md). |
| **discord.yml** ⭐    | The Discord webhooks.                                                                   |
| **pricing.yml**       | The last 10 price generator runs, so they can be undone.                                |

> **Info:**
When a file is missing settings, the plugin rewrites it and keeps what you had in backups, under the same path. A shop or category file that is not valid YAML is never rewritten: it is skipped, reported in the console, and left exactly as it is until you fix it and run /pshop reload.

## What Lives in the Database

Transactions, remaining stock, per-player purchase limits and restock timers are **not** in these files, and neither are restock alert choices ⭐. They are stored in the database configured in `config.yml`, which is SQLite (`data/database.db`) by default and MySQL or MariaDB ⭐ if you set it up.

## Moving to Another Server

To carry your setup across:

* **Configuration** - copy `shops/`, `menus/`, `translations/`, `config.yml`, `settings.yml` and the add-on folders inside `addons/`.
* **Sign and chest shops** - sign shops, shop stands and player shops are in the database, so they come across with it, but only if the worlds come across too.
* **Transactions and stock** - point the new server at the same MySQL database, or stop the server and copy the `data` folder across.

## What to Back Up

The whole plugins/PhoenixShop folder, plus your database if you use MySQL or MariaDB. The editor writes changes to the files as you make them, so those can be backed up while the server runs. For the SQLite database, stop the server first, or copy all three files in `data` together: `database.db` alone can miss the latest changes.

## Reporting a Problem

Turning on `debug` in `config.yml` adds verbose console logging, which is useful to attach when you report an issue to us.

Source: https://www.phoenixplugins.com/docs/phoenix-shop/configurations/file-structure