Importer fails to import every post

Open the WXR in a text editor and see if it contains posts from later years. If not, you will need to revisit your export settings from WP.com to make sure you’re pulling all posts. If it does contain posts from these years, there might be a non UTF8 character breaking the import. You should … Read more

Proper approach to moving complete site from one domain to another AND preserve widgets

There are some instances of serialized data in the database, notably in things like widget options, that become invalidated if you do a blind search-and-replace without accounting for different string lengths. You might try a tool like this one to do a search and replace that also handles serialized data: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

How to migrate a database from a server to another

The database user name/password is not stored in the database; it is only used to access the database. Change the username (and password, too) to the new values in wp-config.php. And the problem might be access to the database via phpmyadmin; check your username/password in Cpanel or some other hosting control panel.

restore a db after bad backup

If you are not moving to a different domain name, the file path shouldn’t really matter. Try these first: Made a copy of your original backup bd Open the new copy and search/replace example.com/ to example.com/blog/ This should get you going no matter what server setup you have. If it doesn’t, and you already have … Read more

Making my plugin create a page?

You can use wp_insert_post to insert a physical page, though I would suggest creating one page for the plugin and then using a rewrite rule to give all of your items a URL with that single page as the base. EDIT quick rewrite example with added query var: function wpa55546_rewrites(){ $page_slug = ‘your-page’; // urls … Read more

Create database on installation

Your SQL command is invalid. The error says: WordPress database error: [Incorrect table definition; there can be only one auto column and it must be defined as a key] CREATE TABLE to_issues ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(125) NOT NULL ) Try: $sql =”CREATE TABLE {$wpdb->prefix}to_issues ( id int(11) unsigned NOT NULL auto_increment, … Read more