⚡Offerwall Ad

Installation & Production Setup Guide

Everything needed to install the script on cPanel/shared hosting or a VPS, configure cron jobs, connect CPA networks and payment providers, set up postbacks, and troubleshoot common deployment issues.

PHP 7.4+PHP 8.1–8.4 recommendedMySQL / MariaDBApache + mod_rewriteHTTPS required for production

1. Server requirements

Offerwall Ad is designed for ordinary PHP/MySQL hosting, including cPanel shared hosting.

RequirementMinimum / recommendedWhy it is needed
PHP7.4 minimum
8.1–8.4 recommended
Application runtime.
MySQL / MariaDBInnoDB + utf8mb4Users, offers, conversions, accounting, postbacks and logs.
PHP extensionsmysqli, curl, mbstring, openssl, fileinfo, jsonDatabase, APIs, encryption, uploads and Unicode handling.
Apache rewritemod_rewrite + .htaccessClean URLs such as /register and /publisher/postbacks.
HTTPSRequired for productionSecure login cookies, provider callbacks, payments and webhooks.
ImageMagickOptional, recommendedAutomatic image compression, campaign thumbnails and favicon size generation.
PHP memory256 MB recommendedCatalog imports and image processing.
Upload size10 MB recommendedLogo/favicon/campaign uploads; application limits are lower than this.
Recommended PHP settings: memory_limit=256M, upload_max_filesize=10M, post_max_size=12M, max_execution_time=120.

2. Quick start

Upload the script

Upload the contents of the package to your domain's document root, for example public_html/. Make sure hidden files such as .htaccess are included.

Create a MySQL database

Create a new, empty database and database user. Grant the user ALL PRIVILEGES on that database.

Enable SSL

Issue/enable an SSL certificate and confirm your domain opens at https://....

Open the installer

Visit https://your-domain.com/install.php. The installer performs a server preflight before changing anything.

Complete the installer form

Enter the database credentials, final application URL, timezone, and first superadmin account.

Add cron jobs

Configure the scheduled tasks listed later in this guide. These power publisher postbacks, email delivery, network synchronization and maintenance.

Configure the admin panel

Set branding, email, payments, CPA networks, postbacks and other platform settings.

3. cPanel installation walkthrough

Upload the files

  1. Open cPanel → File Manager.
  2. Open your target folder, usually public_html.
  3. Upload the ZIP package.
  4. Extract it inside the target folder.
  5. Confirm install.php, .htaccess, database/, includes/, admin/, and cron/ exist.
Hidden files matter. If .htaccess is missing, extensionless/SEO-friendly routes may return 404 errors. In File Manager, enable “Show Hidden Files (dotfiles)” if necessary.

Create the database

  1. Open cPanel → MySQL Databases or Database Wizard.
  2. Create a database.
  3. Create a database user with a strong random password.
  4. Add that user to the database.
  5. Grant ALL PRIVILEGES.

cPanel frequently prefixes both values. If your cPanel account is john, you may see:

Database: john_offerwall User: john_offerwalluser Host: localhost Port: 3306

Use the complete prefixed names in the installer.

Select PHP version/extensions

Depending on the host, open MultiPHP Manager, Select PHP Version, or PHP Extensions. Enable at least:

mysqli curl mbstring openssl fileinfo json

4. File and directory permissions

Do not make the entire script world-writable. Normal permissions are sufficient on most cPanel servers.

PathRecommendedNotes
Folders755Normal application directories.
PHP/CSS/JS files644Normal application files.
config.php600 or 640Contains database credentials and application encryption key.
/uploads755, writable by PHPStores branding and campaign/offer uploads.
Do not use 777 as a permanent fix. If the installer cannot write config.php or /uploads, correct ownership/hosting permissions instead.

5. Using install.php

The web installer performs the following tasks:

  • Checks PHP version and required extensions.
  • Checks database/schema.sql and application write access.
  • Connects to MySQL/MariaDB using the supplied credentials.
  • Refuses to modify databases that already contain user data.
  • Imports the full fresh-install database schema and starter Help Center content.
  • Creates your first verified superadmin account.
  • Generates a 256-bit application encryption key.
  • Generates the cron authentication key.
  • Creates upload directories.
  • Writes config.php and automatically locks the installer.
The final Application URL should not include install.php. Use https://example.com or, for a subdirectory install, https://example.com/network.
The installer is for fresh installations. Do not point it at an existing production database. Use migrations/updater files for future version upgrades.

6. Cron jobs

Open cPanel → Cron Jobs. The absolute path will vary by hosting account. A typical root looks like /home/USERNAME/public_html.

ScheduleScriptPurpose
Every 5 minutesdeliver-webhooks.phpPublisher S2S postback delivery and retries.
Every 5 minutessend-email.phpSends queued lifecycle/support/account email.
Every 15 minutessync-networks.phpSynchronizes active CPA network offer catalogs.
Hourlylifecycle.phpLifecycle rules, promotions and support auto-close processing.
Hourlymaintenance.phpLog retention, history cleanup and campaign maintenance.
Dailyscore-quality.phpTraffic Quality and Advertiser Trust scoring.

Example commands:

*/5 * * * * /usr/local/bin/php -q /home/USERNAME/public_html/cron/deliver-webhooks.php >/dev/null 2>&1 */5 * * * * /usr/local/bin/php -q /home/USERNAME/public_html/cron/send-email.php >/dev/null 2>&1 */15 * * * * /usr/local/bin/php -q /home/USERNAME/public_html/cron/sync-networks.php >/dev/null 2>&1 17 * * * * /usr/local/bin/php -q /home/USERNAME/public_html/cron/lifecycle.php >/dev/null 2>&1 37 * * * * /usr/local/bin/php -q /home/USERNAME/public_html/cron/maintenance.php >/dev/null 2>&1 15 1 * * * /usr/local/bin/php -q /home/USERNAME/public_html/cron/score-quality.php >/dev/null 2>&1
PHP path: /usr/local/bin/php is common but not universal. Your host may provide another binary such as an EasyApache version-specific PHP path. Ask the host or check cPanel documentation if the command fails.

HTTP cron fallback

The cron scripts can be called over HTTPS using the generated cron key, but CLI cron is preferred because the key does not travel through web access logs.

https://example.com/cron/maintenance.php?key=YOUR_CRON_KEY
Keep the cron key private. If it is exposed, replace the cron_key setting in the database/admin configuration.

7. Email and SMTP

Open Admin → Settings and configure the sender address and SMTP details if your hosting environment supports the included PHPMailer integration.

  • Use an address on your domain, such as noreply@example.com.
  • Set SPF, DKIM and DMARC in DNS for good delivery.
  • Use the email queue cron job.
  • Test password-reset and lifecycle email before launch.
If PHPMailer files are not present under includes/phpmailer/src/, the script falls back to PHP's mail() function. SMTP configuration specifically requires PHPMailer.

8. Logo, favicon and image processing

In Admin → Settings, upload the site logo and favicon. Advertisers can upload campaign images while creating campaigns, and admins can replace offer/campaign images from the record editor.

LogoTransparent PNG or WebP recommended. Uploaded branding is automatically resized/compressed when ImageMagick is available.
FaviconA square source is recommended. The platform can generate 16×16, 32×32, 180×180, 192×192, 512×512, multi-size ICO and webmanifest assets.

Campaign images

Uploaded campaign images are optimized and derivative thumbnails are generated for card and square placements when ImageMagick is available. The original application image URL remains the source reference; offerwall/cards use the generated thumbnail when available.

If ImageMagick is unavailable, uploads still save successfully. Only the automatic resizing/compression, crop thumbnails and favicon derivative generation are skipped.

9. Adding CPA networks

Open Admin → Networks. The script includes built-in support/presets for the original networks and also supports an unlimited number of Generic JSON Offer API networks.

Built-in networks

  • Adscend Media
  • CPAlead
  • CPX Research

Custom networks

For a generic network you can configure API URL, GET/POST method, credentials, credential placement, pagination, response path, field mappings, click/SubID parameters and conversion/reversal statuses.

Add the network

Enter a unique slug/name and choose the Generic JSON adapter.

Configure API authentication

Use query, header, POST body, Bearer token, or Basic Auth based on the provider's documentation.

Map offer fields

Map ID, title, payout, destination URL, countries, devices, categories, status, EPC and other supported values.

Configure the network postback

Map the provider's transaction ID, click/SubID, payout and status macros to the generated Offerwall Ad receiver.

Test before activating

Use Test Connection, run a manual offer sync and use the provider's postback tester before production traffic.

Do not guess provider macros. Use the variables/macros shown in that network's own dashboard or official integration documentation.

10. Payment providers

Payment credentials are configured in Admin → Settings. Never place live API secrets in frontend JavaScript or public files.

ProviderCallback / notes
PayPalWebhook: https://YOUR-DOMAIN/webhooks/paypal. Configure Client ID, Client Secret and Webhook ID.
Square / Cash App PayWebhook: https://YOUR-DOMAIN/webhooks/square. Configure Application ID, Location ID, access token and webhook signature key.
NOWPaymentsIPN: https://YOUR-DOMAIN/webhooks/nowpayments. Configure API key and IPN secret.
ZelleManual reconciliation through the admin deposit workflow.
Before using live money: perform provider sandbox/staging tests, verify webhook signatures, verify a deposit is credited exactly once, and test failure/refund/dispute paths.

11. Postbacks and webhooks

Publisher postbacks

Publishers manage their S2S callbacks at /publisher/postbacks. The system supports GET, form POST and JSON delivery, callback passwords, HMAC signatures, test delivery, delivery logs and retries.

Integration presets are available at /publisher/postbacks/integrations, including EvolutionScript, PTC Pro, TonaPTC, Pocket GPT Script, Garnetly, Generic PHP/MySQL GPT, Generic Laravel Rewards and Generic WordPress Rewards.

Advertiser/direct campaign postback

Each direct campaign provides a campaign-specific secret and advertiser postback URL under /campaigns/{ID}/edit. The advertiser must preserve the click_id sent with traffic and return it server-to-server when the conversion occurs.

CPA network inbound postbacks

Built-in and custom networks have receiver URLs configured in Admin → Networks. The receiver validates the network secret/key and attributes the transaction to the original click before crediting money.

Always test the full chain: click → landing page → stored click/SubID → provider conversion → inbound network postback → Offerwall Ad conversion → publisher postback.

12. Cloudflare, CDN and reverse proxy notes

  • Use Full (strict) SSL when possible.
  • Do not cache authenticated dashboard/admin pages.
  • Do not cache postback, webhook, API or cron endpoints.
  • Hosted offerwalls use visitor/device-specific output; avoid forcing edge caching on /wall/*.
  • Allow your payment/network providers to reach webhook and postback endpoints.
  • If security rules block legitimate callbacks, create narrow endpoint exceptions rather than disabling protection site-wide.
Offerwall Ad sets secure-cookie/HSTS behavior from the configured HTTPS application URL, which helps when TLS terminates at a trusted proxy/CDN.

13. Production security checklist

  • Use HTTPS and redirect HTTP traffic to HTTPS.
  • Keep debug=false in production.
  • Keep config.php outside public download access and permissions restrictive.
  • Use a unique superadmin password and a unique database password.
  • Never publish CPA API keys, postback secrets, callback passwords or payment secrets.
  • Configure provider signature verification and use their test/sandbox tools.
  • Keep /uploads/.htaccess in place so executable PHP-like files cannot run from uploads.
  • Use an empty database for new installs; never rerun the installer over production data.
  • Back up both the database and uploaded images before updates.
  • Review Admin → Audit and Admin → System regularly.
  • Test fraud holds, conversion reversals, payout rejection/refunds and campaign escrow before launch.
  • Keep the OS/web server/PHP/MySQL patched.

14. Backups and updates

What to back up

  • The complete MySQL/MariaDB database.
  • config.php.
  • /uploads.
  • Any manually installed PHPMailer files or custom provider integration code.

Before updating

  1. Put the site into a maintenance window if the update changes database/accounting code.
  2. Create a full database backup.
  3. Create a file backup.
  4. Read the release notes.
  5. Run only the migrations included for that version, if any.
  6. Do not overwrite your live config.php with an example config.
  7. Test login, offerwall, conversion, postbacks, payouts and deposits after updating.

15. Troubleshooting

Installer says database connection failed.

Use the full cPanel-prefixed database name/username, confirm the password, ensure the database user was assigned to that database with ALL PRIVILEGES, and usually use localhost as host.

Installer says the selected database already contains tables.

Use a new empty database. Only use “Resume a partial fresh installation” if a previous install attempt created tables and there are no users. The installer refuses databases with existing user data.

config.php cannot be written.

Check file ownership and root directory permissions. Temporarily give the PHP/web-server user write access to the application root. Do not permanently use 777.

Clean URLs return 404.

Confirm the included .htaccess exists and Apache mod_rewrite/AllowOverride is enabled. On cPanel Apache hosting this is usually automatic.

Logo/campaign upload fails.

Confirm fileinfo is enabled, /uploads is writable, and PHP upload_max_filesize/post_max_size are large enough.

Uploads work but there are no generated thumbnails or favicon sizes.

ImageMagick is optional. Ask the host to enable/install ImageMagick/Convert. The script still stores the original upload when ImageMagick is unavailable.

Email stays queued.

Confirm the send-email.php cron runs. If using SMTP, make sure PHPMailer exists under includes/phpmailer/src/ and the SMTP credentials are correct. Also verify SPF/DKIM/DMARC.

Publisher postbacks are delayed.

Verify cron/deliver-webhooks.php is scheduled and the endpoint is public HTTPS. Check publisher/admin delivery logs for HTTP status and response errors.

Network offers are not updating.

Check the network is Active, run Test Connection/Sync Offers in Admin → Networks, confirm the credentials/field mappings, and verify the sync-networks.php cron.

Provider webhook/postback returns 403 or never arrives.

Check the secret/key, HTTPS certificate, Cloudflare/WAF rules, provider macro names and that the callback URL is copied exactly from the admin interface.

The page is blank/HTTP 500.

Temporarily check your hosting PHP error log. Common causes are a missing required extension, incompatible PHP version, missing files after ZIP extraction or incorrect filesystem ownership.

Styles look old after an update.

Hard-refresh the browser and purge any CDN/Cloudflare cache. Do not aggressively cache authenticated PHP pages.

Launch checklist

  • Installer finished and superadmin login works.
  • HTTPS works with no certificate warnings.
  • Admin branding/logo/favicon configured.
  • Email sending tested.
  • All cron jobs running.
  • At least one CPA network connection and offer sync tested.
  • Inbound conversion postback tested.
  • Publisher S2S postback tester passed.
  • Advertiser campaign postback tested.
  • Deposit sandbox test completed without duplicate credit.
  • Payout request/reject/paid accounting tested.
  • Database and files backed up.

Do not accept production deposits or large traffic volumes until the full conversion and payment lifecycle has been tested with your own live provider credentials/settings.