Skip to content

bars38/Wordpress-import-featured-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordpress import featured images

This code will help you to import featured images to your new site.

Steps

  1. On old database make copy of tables wp_posts and wp_postmeta to xp_posts and xp_postmeta (can do it with help PHPMyAdmin).
  2. Export new tables xp_posts and xp_postmeta to .sql files.
  3. Import these tables into new WordPress database.
  4. Copy all images from wp-content\uploads on old site to new one.
  5. In index.php write down options to access to WordPress database
$database = new medoo([
	// required
	'database_type' => 'mysql',
	'database_name' => 'database',
	'server' => 'host',
	'username' => 'user_name',
	'password' => 'password',
	'charset' => 'utf8'
]);
  1. Check, do you copy /lib/medoo.php
  2. Run index.php

Don't forget to make backup of you current WordPress database before running this script!!!

If you have some questions or proposition, please write me an email: bars38@gmail.com

Thanks to catfan for Medoo

P.S. May be you will need to run query after all

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldsite.com','http://newsite.com');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages