$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>mysql - How to get data from WordPress site sql file|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

mysql - How to get data from WordPress site sql file

matteradmin9PV0评论

I have an SQL file of my WordPress site but I lost my project files. So if I import the sql into my DB then can I run the sql with new database file? Or is there any other way to back the previous data?

I have an SQL file of my WordPress site but I lost my project files. So if I import the sql into my DB then can I run the sql with new database file? Or is there any other way to back the previous data?

Share Improve this question edited Nov 8, 2018 at 15:38 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Nov 7, 2018 at 5:59 Md. Abu ZamanMd. Abu Zaman 1251 silver badge4 bronze badges 3
  • Are you sure you don't have a backup of the images of your websites somewhere else? – Remzi Cavdar Commented Nov 7, 2018 at 6:14
  • Yes, I am sure. – Md. Abu Zaman Commented Nov 7, 2018 at 6:19
  • Okay, that I'm truly sorry for you. The only good thing is you will have your pages and posts back. – Remzi Cavdar Commented Nov 7, 2018 at 6:23
Add a comment  | 

1 Answer 1

Reset to default 1

The problem is that your images reside in /wp-content/uploads/ and without this folder, everything will be restored except images and some files you have previously uploaded to the Media Library. The plugin(s) and the theme you used could be installed (uploaded and activated) again.

To backup a WordPress websites you only need to backup the following:

  • /wp-content/plugins/ - to backup the plugin(s) you use
  • /wp-content/themes/ - you only need to backup your active theme, the theme you're using
  • /wp-content/uploads/ - Mostly for your images and other things you have uploaded to the Media Library
  • And of course your database

Without these folders, you get all your post and pages back, but since you have no files and/or folders of your website, you will have no images, no plugins and you will have to install your plugin(s) and theme again or use another one.

Post a comment

comment list (0)

  1. No comments so far