简体   繁体   English

如何仅使用它的备份文件夹重新安装 WordPress 站点?

[英]How to reinstall WordPress site using only a backup folder of it?

My old WordPress site's host is not accessible so I decided to copy the WordPress folder out as a backup hoping to recreate this into another host.我的旧 WordPress 站点的主机无法访问,因此我决定将 WordPress 文件夹复制出来作为备份,希望将其重新创建到另一个主机中。

The question is how can I make this WordPress site up and running again in another host?问题是我怎样才能让这个 WordPress 网站在另一台主机上再次运行? I only have the folder but if anything is needed more than that, I will try to get it out from the old host if possible.我只有这个文件夹,但如果需要更多的东西,我会尽可能从旧主机中取出它。

I tried searching but there seems to be either migrating using import/export or using plugins.我尝试搜索,但似乎使用导入/导出或使用插件进行迁移。 I cannot get everything from the old host, only some.我不能从旧主机那里得到所有东西,只能得到一些。

The most important in your wordpress it's the database.在你的 wordpress 中最重要的是数据库。 You must export your database, with phpadmin or other.您必须使用 phpadmin 或其他方式导出数据库。

then you must change all occurences of the old host by the new.那么您必须通过新主机更改旧主机的所有出现。

If the wordpress is no longer accessible you must find where is store your database.如果 wordpress 不再可用,您必须找到存储数据库的位置。 For this, you must look in the wp-config file at the root of wordpress project.为此,您必须查看 wordpress 项目根目录下的 wp-config 文件。 In this file :在这个文件中:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );

/** MySQL database username */
define( 'DB_USER', 'username_here' );

/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

With this informations you can connect to the database.有了这些信息,您就可以连接到数据库。

If the DB_HOST refers to a phpmyadmin website you can export the database with this如果 DB_HOST 指的是 phpmyadmin 网站,您可以使用导出数据库

For more informations欲了解更多信息

You say, no more Dashboard access.你说,没有更多的仪表板访问。 But maybe you are lucky and you still got FTP access.但也许您很幸运,您仍然可以访问 FTP。 in this case you could upload a database tool like Adminer , configure it with the data you find in wp-config.php and export the database from Adminer.在这种情况下,您可以上传像Adminer这样的数据库工具,使用您在 wp-config.php 中找到的数据对其进行配置,然后从 Adminer 导出数据库。

Also, are you sure you dont have a backup-folder in your wp-content / uploads Folder?另外,您确定您的 wp-content / uploads 文件夹中没有备份文件夹吗? If you had a backup-tool installed, you will find the .sql file in there.如果您安装了备份工具,您会在其中找到 .sql 文件。

If you're unable to access the site database then you won't be able to copy any content from the old site.如果您无法访问站点数据库,那么您将无法从旧站点复制任何内容。 All the content is in your database.所有内容都在您的数据库中。

The best you can do is to reinstall WP with a fresh database then copy over your theme file from your backup (wp-content > themes) and any plugins your site uses (wp-content > plugins) then activate them all.您能做的最好的事情是使用新的数据库重新安装 WP,然后从备份(wp-content > 主题)和您网站使用的任何插件(wp-content > 插件)复制主题文件,然后将它们全部激活。 You'll have a site with the same theme, styling and functionality but will have to start again with creating pages and content.您将拥有一个具有相同主题、样式和功能的站点,但必须重新开始创建页面和内容。

You may also be able to save any images etc. that you've uploaded to the site by copying them from wp-content > uploads.您还可以通过从 wp-content > uploads 复制它们来保存您上传到网站的任何图像等。 Files you upload are the only part of your content that is held on the server and not in the database.您上传的文件是您的内容中唯一保存在服务器上而不是数据库中的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM