How to Assign / Move all Deleted post to a category

Option 1: backup – Many hosts offer backups. Sometimes you have to pay for them, but often even when you do, they’ve actually been backing everything up and paying just allows you to access them. Worth checking as this will be fastest. Option 2: post listing screen – If these posts all had only 1 … Read more

Pages from custom table

Your code worked absolutely fine for me, so I suspected you forgot to flush the rewrite rules. Each time after you added code which alters the WordPress rewrite rules, e.g. add_rewrite_rule() or code which registers/un-registers a CPT or custom taxonomy with URL rewriting enabled, you should always flush the rewrite rules which means WordPress will … Read more

Connect to database in the header of my WordPress website

You can (and should) use the existing database connection by accessing global $wpdb. The simplest way to use it is with the get_results() method: global $wpdb; $results = $wpdb->get_results( ‘SELECT * FROM my_table’ ); There’s other methods available, and things you need to consider like preparing queries and using the correct table prefix (if your … Read more

wp_posts table extremely large

Most of the space in that table in your case is taken by the overhead. 919MB is full size, with 885MB of overhead. Overhead is caused by the storage and index write operations in the MyISAM database engine storage. You can run this query to clear overhead: OPTIMIZE TABLE `wpwn_posts` Or, you can convert all … Read more

Move posts from a non-wordpress site to wordpress

If the previous posts are a service supported by WordPress’ importer you could try using that. https://wordpress.org/support/article/importing-content/ If that doesn’t support your previous blog service you could try WP All Import http://www.wpallimport.com/ I’ve used both of these methods with pretty good success.