Getting WordPress images into the Media Library after migration
I am moving from one WordPress host to another. I'm stuck at getting migrated images to show up in the media library.
This is what I did:
- I zipped and downloaded all the files in the wp-content/uploads folder and then unzipped them into the new server's upload directory.
- I exported the wp_posts data:
select * from wp_posts where post_type='attachment'
and all the wp_postmeta with those post_id's. - I did a search and replace in the SQL files to update the domain name.
- None of those
wp_posts.ID
orwp_postmeta.meta_id
's conflicted with the new database, so I imported the SQL files.
The data is in the tables, but still nothing is showing up in the media library. The date filter drop down list in the Media Library is showing all the months for the folders, but it's not showing any images "No Media Files Found".
The images are in the right place, since the page builder I'm using is showing all the images properly (with the new domain name in their URLs).
Is there an extra step I'm missing to get the images on the new server to show up in the media library?
mysql wordpress image media
add a comment |
I am moving from one WordPress host to another. I'm stuck at getting migrated images to show up in the media library.
This is what I did:
- I zipped and downloaded all the files in the wp-content/uploads folder and then unzipped them into the new server's upload directory.
- I exported the wp_posts data:
select * from wp_posts where post_type='attachment'
and all the wp_postmeta with those post_id's. - I did a search and replace in the SQL files to update the domain name.
- None of those
wp_posts.ID
orwp_postmeta.meta_id
's conflicted with the new database, so I imported the SQL files.
The data is in the tables, but still nothing is showing up in the media library. The date filter drop down list in the Media Library is showing all the months for the folders, but it's not showing any images "No Media Files Found".
The images are in the right place, since the page builder I'm using is showing all the images properly (with the new domain name in their URLs).
Is there an extra step I'm missing to get the images on the new server to show up in the media library?
mysql wordpress image media
add a comment |
I am moving from one WordPress host to another. I'm stuck at getting migrated images to show up in the media library.
This is what I did:
- I zipped and downloaded all the files in the wp-content/uploads folder and then unzipped them into the new server's upload directory.
- I exported the wp_posts data:
select * from wp_posts where post_type='attachment'
and all the wp_postmeta with those post_id's. - I did a search and replace in the SQL files to update the domain name.
- None of those
wp_posts.ID
orwp_postmeta.meta_id
's conflicted with the new database, so I imported the SQL files.
The data is in the tables, but still nothing is showing up in the media library. The date filter drop down list in the Media Library is showing all the months for the folders, but it's not showing any images "No Media Files Found".
The images are in the right place, since the page builder I'm using is showing all the images properly (with the new domain name in their URLs).
Is there an extra step I'm missing to get the images on the new server to show up in the media library?
mysql wordpress image media
I am moving from one WordPress host to another. I'm stuck at getting migrated images to show up in the media library.
This is what I did:
- I zipped and downloaded all the files in the wp-content/uploads folder and then unzipped them into the new server's upload directory.
- I exported the wp_posts data:
select * from wp_posts where post_type='attachment'
and all the wp_postmeta with those post_id's. - I did a search and replace in the SQL files to update the domain name.
- None of those
wp_posts.ID
orwp_postmeta.meta_id
's conflicted with the new database, so I imported the SQL files.
The data is in the tables, but still nothing is showing up in the media library. The date filter drop down list in the Media Library is showing all the months for the folders, but it's not showing any images "No Media Files Found".
The images are in the right place, since the page builder I'm using is showing all the images properly (with the new domain name in their URLs).
Is there an extra step I'm missing to get the images on the new server to show up in the media library?
mysql wordpress image media
mysql wordpress image media
edited Jan 20 at 8:09
ZRM
asked Jan 20 at 6:58
ZRMZRM
64
64
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You do not need the export the wp_post data or wp_postmeta.
Here's how I migrate my websites manually:
- Export the whole database and download the files.
- Import the whole database and copy the files on the root folder.
Then on your phpmyadmin and run these scripts, select
wp_options
table:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl',
'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
- On the
wp_posts
table run these:
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
- On
wp_postmeta
table run this:
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
- On the
Make sure to change the urls. This will fix the images and other media that are not showing because the url is broken or your site is showing the old url.
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
add a comment |
The easiest way to migrate to another host and keep the links and images intact is to use the plugin called All in One WP Migration
The Step to follow is:
- Install the plugin on your website
- Create a backup, the result will be .wpress, download it
- In the new host, install a clean copy of WP
- Install the plugin on this new website
- Import the .wpress backup
This will tell you that all data of your new installation will be replaced by the one from your previous host but all links will be updated. So old-domain.com
will be replaced by new-domain.com
without making changes anywhere (database or content).
Tested this many times so I know it works well. There is a reason why it has 1+M downloads.
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54274278%2fgetting-wordpress-images-into-the-media-library-after-migration%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You do not need the export the wp_post data or wp_postmeta.
Here's how I migrate my websites manually:
- Export the whole database and download the files.
- Import the whole database and copy the files on the root folder.
Then on your phpmyadmin and run these scripts, select
wp_options
table:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl',
'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
- On the
wp_posts
table run these:
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
- On
wp_postmeta
table run this:
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
- On the
Make sure to change the urls. This will fix the images and other media that are not showing because the url is broken or your site is showing the old url.
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
add a comment |
You do not need the export the wp_post data or wp_postmeta.
Here's how I migrate my websites manually:
- Export the whole database and download the files.
- Import the whole database and copy the files on the root folder.
Then on your phpmyadmin and run these scripts, select
wp_options
table:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl',
'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
- On the
wp_posts
table run these:
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
- On
wp_postmeta
table run this:
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
- On the
Make sure to change the urls. This will fix the images and other media that are not showing because the url is broken or your site is showing the old url.
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
add a comment |
You do not need the export the wp_post data or wp_postmeta.
Here's how I migrate my websites manually:
- Export the whole database and download the files.
- Import the whole database and copy the files on the root folder.
Then on your phpmyadmin and run these scripts, select
wp_options
table:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl',
'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
- On the
wp_posts
table run these:
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
- On
wp_postmeta
table run this:
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
- On the
Make sure to change the urls. This will fix the images and other media that are not showing because the url is broken or your site is showing the old url.
You do not need the export the wp_post data or wp_postmeta.
Here's how I migrate my websites manually:
- Export the whole database and download the files.
- Import the whole database and copy the files on the root folder.
Then on your phpmyadmin and run these scripts, select
wp_options
table:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl',
'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
- On the
wp_posts
table run these:
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
- On
wp_postmeta
table run this:
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
- On the
Make sure to change the urls. This will fix the images and other media that are not showing because the url is broken or your site is showing the old url.
answered Jan 20 at 12:10
Romel IndemneRomel Indemne
1495
1495
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
add a comment |
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
Thanks, but I'm just trying to export/import only pages and media. I don't want anything else overwritten.
– ZRM
Jan 20 at 18:03
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
If that's the case. You can export data from wordpress dashboard. Go to Wp Dashboard->Tools->Export. Select the data you want to export then download. You will get the xml file. Then import the xml file to the new website under Tool->Import.
– Romel Indemne
Jan 21 at 4:42
add a comment |
The easiest way to migrate to another host and keep the links and images intact is to use the plugin called All in One WP Migration
The Step to follow is:
- Install the plugin on your website
- Create a backup, the result will be .wpress, download it
- In the new host, install a clean copy of WP
- Install the plugin on this new website
- Import the .wpress backup
This will tell you that all data of your new installation will be replaced by the one from your previous host but all links will be updated. So old-domain.com
will be replaced by new-domain.com
without making changes anywhere (database or content).
Tested this many times so I know it works well. There is a reason why it has 1+M downloads.
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
add a comment |
The easiest way to migrate to another host and keep the links and images intact is to use the plugin called All in One WP Migration
The Step to follow is:
- Install the plugin on your website
- Create a backup, the result will be .wpress, download it
- In the new host, install a clean copy of WP
- Install the plugin on this new website
- Import the .wpress backup
This will tell you that all data of your new installation will be replaced by the one from your previous host but all links will be updated. So old-domain.com
will be replaced by new-domain.com
without making changes anywhere (database or content).
Tested this many times so I know it works well. There is a reason why it has 1+M downloads.
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
add a comment |
The easiest way to migrate to another host and keep the links and images intact is to use the plugin called All in One WP Migration
The Step to follow is:
- Install the plugin on your website
- Create a backup, the result will be .wpress, download it
- In the new host, install a clean copy of WP
- Install the plugin on this new website
- Import the .wpress backup
This will tell you that all data of your new installation will be replaced by the one from your previous host but all links will be updated. So old-domain.com
will be replaced by new-domain.com
without making changes anywhere (database or content).
Tested this many times so I know it works well. There is a reason why it has 1+M downloads.
The easiest way to migrate to another host and keep the links and images intact is to use the plugin called All in One WP Migration
The Step to follow is:
- Install the plugin on your website
- Create a backup, the result will be .wpress, download it
- In the new host, install a clean copy of WP
- Install the plugin on this new website
- Import the .wpress backup
This will tell you that all data of your new installation will be replaced by the one from your previous host but all links will be updated. So old-domain.com
will be replaced by new-domain.com
without making changes anywhere (database or content).
Tested this many times so I know it works well. There is a reason why it has 1+M downloads.
edited Jan 20 at 15:53
answered Jan 20 at 15:47
xDiffxDiff
36724
36724
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
add a comment |
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
Thanks. But I only want to migrate pages and images and not any other data.
– ZRM
Jan 20 at 16:33
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54274278%2fgetting-wordpress-images-into-the-media-library-after-migration%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown