# Installing Bidda School Management WordPress Plugin

## Prerequisites

1. WordPress 5.0 or higher installed
2. FTP or file manager access to your WordPress installation
3. Basic understanding of WordPress plugin management

## Installation Methods

### Method 1: Manual Installation (Recommended)

1. **Download the Plugin Files**
   - All plugin files are located in the temporary directory shown in the packaging script output
   - The directory will be something like: `C:\Users\[username]\AppData\Local\Temp\bidda-school-management`

2. **Upload Files to WordPress**
   - Connect to your WordPress site via FTP or file manager
   - Navigate to `/wp-content/plugins/`
   - Create a new directory called `bidda-school-management`
   - Upload all files from the temporary directory to this new directory

3. **Activate the Plugin**
   - Log in to your WordPress admin dashboard
   - Go to Plugins → Installed Plugins
   - Find "Bidda School Management" in the list
   - Click "Activate"

### Method 2: Using WordPress Admin (If you have a zip file)

1. **Create a Zip File** (if not already created)
   - If you have the ZipArchive class available, run the packaging script again
   - Or manually create a zip file containing all plugin files

2. **Upload via WordPress Admin**
   - Log in to your WordPress admin dashboard
   - Go to Plugins → Add New
   - Click "Upload Plugin"
   - Select the zip file
   - Click "Install Now"
   - Click "Activate Plugin"

## Configuration

### 1. Database Settings

1. After activation, go to "Bidda School" in your WordPress admin menu
2. Click "Settings"
3. Configure your database connection:
   - **Database Host**: Usually `localhost`
   - **Database Name**: Your existing Bidda database name
   - **Database Username**: Database username
   - **Database Password**: Database password
   - **Bidda Installation Path**: Path to your Bidda files (if applicable)

### 2. Create Pages

Create WordPress pages for each Bidda feature:

1. Go to Pages → Add New
2. Create pages with the following shortcodes:
   - **Login Page**: Add `[bidda_login]` shortcode
   - **Dashboard**: Add `[bidda_dashboard]` shortcode
   - **My Fees**: Add `[bidda_my_fees]` shortcode
   - **Attendance**: Add `[bidda_my_attendance]` shortcode
   - **Results**: Add `[bidda_my_results]` shortcode
   - **Notices**: Add `[bidda_notices]` shortcode

### 3. User Synchronization

1. Go to Bidda School → User Synchronization in the admin menu
2. Run the synchronization process to link WordPress users with Bidda users

## Troubleshooting

### Common Issues

1. **Plugin Not Appearing**
   - Check that files were uploaded to the correct directory
   - Verify file permissions (should be 644 for files, 755 for directories)
   - Clear WordPress cache if using a caching plugin

2. **Database Connection Errors**
   - Double-check database credentials
   - Ensure the database server is accessible
   - Verify that the database user has proper permissions

3. **Shortcodes Not Working**
   - Confirm the plugin is activated
   - Check that shortcode names are spelled correctly
   - Verify that required files exist

4. **User Synchronization Failures**
   - Ensure both WordPress and Bidda databases are accessible
   - Check user table structures in both systems
   - Verify that database permissions allow INSERT operations

### Getting Help

If you encounter issues:

1. Check the WordPress debug log for error messages
2. Verify that all file paths are correct
3. Ensure proper file permissions on your server
4. Refer to the documentation files included with the plugin:
   - `DEPLOYMENT-GUIDE.md`
   - `WORDPRESS-INTEGRATION-SUMMARY.md`
   - `COMPLETE-DEPLOYMENT-GUIDE.md`

## Next Steps

1. Customize the appearance to match your WordPress theme
2. Add additional functionality as needed
3. Monitor performance and optimize as necessary
4. Set up regular backups for both WordPress and Bidda databases
5. Test all functionality thoroughly

## Support

For additional help with the integration:

1. Refer to the documentation files included with the plugin
2. Check WordPress and PHP error logs
3. Consult WordPress plugin development documentation
4. Reach out to WordPress community forums