Title: wp-load.php
Last modified: May 26, 2021

---

# wp-load.php

 *  [mahdiacdev](https://wordpress.org/support/users/mahdiacdev/)
 * (@mahdiacdev)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/wp-load-php-3/)
 * hi I have the WordPress Environment in a PHP file that exists outside of my WordPress
   installation that uses wp-load.php
 * I have used this PHP file for inserting posts to my WordPress site that works
   fine.
 * but after I migrate from my prior hosting to a new one.
 * inserting post is failed like this image
 * this is for what? (i guess after change hosting must set up new privileges for
   the user that insert post to site )
 * see image :
 * > [View post on imgur.com](https://imgur.com/smACx2z)
 * and I can’t delete posts
 * thanks

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/wp-load-php-3/#post-14517169)
 * That looks more like data corruption due to migration than any issue with wp-
   load.php. Including wp-load.php is frowned upon because it can be problematic
   when utilized on certain installations that use non-standard paths to resources.
   When that happens there are very obvious PHP and file system errors.
 * One way data gets corrupted on migration is the post table’s auto-increment value
   does not get updated to be greater than the highest ID number. I’ve no idea of
   that’s the issue here, but it’s a possibility.
 * The WP user capabilities are maintained in the DB and should be correctly migrated.
   The DB user WP uses (defined in wp-config.php) may need its permissions set for
   the new WP database. Usually done in phpMyAdmin, but can vary somewhat by host.

Viewing 1 replies (of 1 total)

The topic ‘wp-load.php’ is closed to new replies.

## Tags

 * [wp-load.php](https://wordpress.org/support/topic-tag/wp-load-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/wp-load-php-3/#post-14517169)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
