• 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

    and I can’t delete posts

    thanks

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    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.