Title: Plugin issue in external php page
Last modified: August 30, 2016

---

# Plugin issue in external php page

 *  Resolved [bractar](https://wordpress.org/support/users/bractar/)
 * (@bractar)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/plugin-issue-in-external-php-page/)
 * Hello,
    everything is fine on my local machine but as soon as I upload to my 
   server, I get the following error message:
 * > PHP Fatal error: Class ‘MY_Analytics’ not found in /vhosts/production/httpdocs/
   > portal/analytics/index.php on line 22
 * here’s the beginning of my external php page (based on [https://cooltrainer.org/fixing-false-404-headers-on-external-pages-including-wp-blog-header-php/](https://cooltrainer.org/fixing-false-404-headers-on-external-pages-including-wp-blog-header-php/)):
 *     ```
       require_once('../wp-config.php');
       $wp->init();  //set up the current user.
       $wp->parse_request(); //Parse request to find correct WordPress query.
       $wp->query_posts(); //Set up the Loop based on the query variables.
       $wp->register_globals();  //Set up the WordPress Globals.
       $wp->send_headers();  //Sets the X-Pingback header, 404 status (if 404), Content-type. If showing a feed, it will also send last-modified, etag, and 304 status if needed.
       require_once('../wp-load.php');
       ```
   
 * Then line 22, I have
    `$MYA = new MY_Analytics();`
 * It seems that my plugin is not loaded at this point.
    How can I solve the issue?
 * Thanks

Viewing 1 replies (of 1 total)

 *  Thread Starter [bractar](https://wordpress.org/support/users/bractar/)
 * (@bractar)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/plugin-issue-in-external-php-page/#post-6672487)
 * humm… it seems that the plugin wasn’t active, I had to re-activate it 🙂

Viewing 1 replies (of 1 total)

The topic ‘Plugin issue in external php page’ is closed to new replies.

## Tags

 * [external](https://wordpress.org/support/topic-tag/external/)

 * 1 reply
 * 1 participant
 * Last reply from: [bractar](https://wordpress.org/support/users/bractar/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/plugin-issue-in-external-php-page/#post-6672487)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
