# Installation

## Requirements

- WordPress 5.8 or higher
- PHP 7.4 or higher
- Write access to `wp-content/` for local file storage
- Node.js and npm (for building assets from source, if not using pre-built files)

## Installing the Plugin

1. Upload the `FlexUploader` folder to your `/wp-content/plugins/` directory.
2. Log in to the WordPress admin dashboard.
3. Go to **Plugins > Installed Plugins**.
4. Find **FlexUploader** in the list and click **Activate**.

On activation, the plugin automatically creates the following directories within your WordPress content folder:

- `wp-content/flexuploader-files/` — Storage directory for locally uploaded files.
- `wp-content/flexuploader-tmp/` — Temporary directory used during chunked uploads.

Both directories are secured with an `.htaccess` file and a blank `index.php` to prevent direct browser access.

## Building Assets (Development / Source Installs)

If you are working from source (without pre-compiled assets), you must build the JS and CSS before the plugin will function correctly.

```bash
# Install dependencies
npm install

# Build for production
npm run build

# Or watch during development
npm run dev
```

Compiled assets are placed in `assets/js/` and `assets/css/`. These files are what the plugin enqueues on the frontend and admin.

## Initial Configuration

Once activated, a **FlexUploader** menu item will appear in the WordPress admin sidebar. Before placing any upload forms on your site, you must configure at least one **Destination** and one **Source Type**.

See [Configuration](configuration.md) for full details.
