wp-admin移动后无法访问 [英] wp-admin can't access after moving

查看:136
本文介绍了wp-admin移动后无法访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要提及我有google搜索解决方案,然后在这里发布。



我将我的wordpress网站移动到其他网域和不同的伺服器。



wp_config.php edited;数据库,数据库用户名,passwword和主机都已更改。 table_prefix保持不变,因为我使用同一个。



wp_posts和wp_option我也改变了。



仍然会收到此错误消息。

 您没有足够的权限访问此页面



任何人都知道发生了什么以及如何解决这个问题。



wp-移动后访问

解决方案

如果您在不更改WordPress网站的首页和网站网址的情况下移动您的网域,


  1. 如果数据库和URL保持不变,则只需复制文件和数据库即可移动。

  2. 如果数据库名称或用户更改,请编辑wp-config.php以获取正确的值。

  3. 如果要在切换之前进行测试,您必须临时更改数据库表wp_options(通过phpMyAdmin或类似)中的siteurl和home。

  4. 如果您有任何类型的重写


  5. EDIT (如果您的网站网址也发生了变化,我只是从codex网站的语言)



    移动网站和更改您的域名或网址(即从 http://example.com/site 更改为 http://example.com http://example.com 更改为< a href =http://example.net =nofollow> http://example.net )需要执行以下步骤。


    1. 下载您现有的网站档案。

    2. 汇出资料库 - 进入mySQL并汇出资料库。

    3. 将备份的文件和数据库移动到新文件夹中 - 这是您的网站备份。

    4. 登录到您要移动的网站,然后依次转到设置>常规更改URL。 (即从 http://example.com/ http://example.net ) - 保存设置并期待看到404页面。

    5. 再次下载您的网站文件。

    6. 使用新服务器的mySQL数据库名称,用户和密码编辑wp-config.php。

    7. 上传文件。

    8. 在新服务器上导入数据库。

    域名或URL更改还有其他问题。可以移动文件和数据库,但是对旧域名或位置的引用将保留在数据库中,并且可能会导致链接或主题显示问题。



    如果您在整个数据库上执行搜索和替换以更改URL,您可能会导致数据序列化的问题,因为一些主题和小部件存储的值与您标记的URL的长度。当这种变化,事情打破。为避免序列化问题,您有两个选项:


    1. 仅在wp_posts表上执行搜索和替换。

    2. 使用WordPress数据库脚本的搜索和替换来安全地更改所有实例。


    I need mention that I had google search the solution before post at here.

    I move my wordpress site to another domain and different server.

    wp_config.php edited; database, database username, passwword, and host all changed. table_prefix remain the same because i use the same one.

    wp_posts and wp_option i had changed too.

    I still got this error message anyway.

    You do not have sufficient permissions to access this page
    

    Anyone know what happen and how to fix this ?

    wp-admin can't access after moving

    解决方案

    If you are moving your domain without changing the Home and Site URLs of your WordPress site you can follow the below guidelines as prescribed by the wordpress codex.

    1. If database and URL remain the same, you can move by just copying your files and database.
    2. If database name or user changes, edit wp-config.php to have the correct values.
    3. If you want to test before you switch, you must temporarily change "siteurl" and "home" in the database table "wp_options" (through phpMyAdmin or similar).
    4. If you had any kind of rewrites (permalinks) setup you must disable .htaccess and reconfigure permalinks when it goes live.

    EDIT (if your site url has also changed, well i am only phrasing from the codex site)

    Moving a website and changing your domain name or URLs (i.e. from http://example.com/site to http://example.com, or http://example.com to http://example.net) requires the following steps - in sequence.

    1. Download your existing site files.
    2. Export your database - go in to mySQL and export the database.
    3. Move the backed up files and database into a new folder - somewhere safe - this is your site backup.
    4. Log in to the site you want to move and go to Settings > General, then change the URLs. (ie from http://example.com/ to http://example.net ) - save the settings and expect to see a 404 page.
    5. Download your site files again.
    6. Export the database again.
    7. Edit wp-config.php with the new server's mySQL database name, user and password.
    8. Upload the files.
    9. Import the database on the new server.

    When your domain name or URLs change there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.

    If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have two options:

    1. Only perform a search and replace on the wp_posts table.
    2. Use the Search and Replace for WordPress Databases Script to safely change all instances.

    这篇关于wp-admin移动后无法访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆