Cannot login to WordPress admin after update

Upgrade your PHP version to 7.2. If that gives you access, update all themees/plugins and WP to latest versions. (PHP version updates done through your hosting Control Panel. Your hosting place should have help docs on how to set your PHP version.) Test those upgrades, then upgrade PHP to version 8.x. There are major security … Read more

How to change wordpress adminstrator user ‘s ID from 1 to 0?

The MySQL table that stores the user data wp_users have an autoincrement on the primary key ID. The database will handle it automatically to avoid duplicated values and the minimal value is 1. There is nothing you can do about it. Here is the WP tables shema if you want to have a look https://codex.wordpress.org/Database_Description#Table:_wp_users … Read more

wp_login.php redirects to old domain

You also need to change the home url (not only site url) and any other reference to the old domain in the database. To do that without breaking serialized data, you could use any of the tools receommended in the Codex’s article: “Moving WordPress” in the section “Changing Your Domain Name and URLs”.

Importing posts content from csv

You can use wp all export to export posts, change content. Them import them back with wp all import. Use update existing post option and chose to unique ID to be post title and to update only content field.. So it will find post with same title, it won’t change it and just update content.

Delete all pages (thousands) except a few by their IDs

You could do something like this if (current_user_can(‘administrator’)) { $pages = get_posts([ ‘post_type’ => ‘page’, // get only pages ‘posts_per_page’ => -1, // get all ‘post_status’ => array_keys(get_post_statuses()), // all post statuses (publish, draft, private etc…) ‘post__not_in’ => [8,18,15,16,17] // list of ids you want to exclude (pages not for deletion) ]); foreach ($pages as … Read more