Reattach media after moving to another server

When you use the importer it should prompt whether to download any media/attachments it finds in the posts. If you don’t say yes, they will not be added to your Media database. To my knowledge, even if you do say yes, Featured Images are not included. It’s a very rare instance that I recommend using … Read more

Designing a plugin that uses an iFrame to process data in admin

You could target admin-post.php to do the processing via the admin_post_$youraction hook: This hook allows you to create custom handlers for your own custom GET and POST requests. The admin_post_ hook follows the format “admin_post_$youraction”, where $youraction is your GET or POST request’s ‘action’ parameter. You can output the URL via admin_url( ‘admin-post.php?action=add_foobar’ ). Then … Read more

Import a header template from another theme

As you have now stated that both Theme A and Theme B are already Child Themes, perhaps you could try adding this to your funcions.php file in Theme B – add_action(‘wp_enqueue_scripts’, ‘enqueue_front_scripts’); function enqueue_front_scripts(){ /** Switch to the parent blog */ switch_to_blog(1); // You may need to change the ID, I don’t know what ID … Read more

Import users once a day without a plugin

You can use wp_create_user and pass necessary information like $username, $password, $email , where $email is optional. If user created successfully it will return ID of newly created user, other wise will return error object. Then update user’s other information using update_user_meta.

Exporting featured image

The way WordPress works is that the files need to be there, but they also need to be registered in the database to be listed in the Media Library. I don’t know the DownML Plugin, but it seems as this is only for backups, not for migrating data as you are trying. What you apparently … Read more

Import subdomain WordPress into main domain WordPress

Your logic and the steps you plan on following look good to me. This is more or less exactly how I would handle the issue. However when you import the XML file from sub.example.com into example.com, you’ll want to check the links to the media files within the newly-imported posts. I believe they are still … Read more

Migration problems with mysql: Operation not allowed when innodb_forced_recovery > 0 [closed]

Commenting out the line innodb_force_recovery = 1 in /etc/my.cnf thus: # innodb_force_recovery = 1 made the mysql innodb tables in the database accessible. Apparently this setting causes innodb to become read-only. I hope this helps someone in the future. If you don’t have access to /etc/my.cnf on shared hosting, ask your host to fix it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)