admin管理员组文章数量:1125603
My (inherited) WordPress website is setup like this:
example
is the main version of the siteen.example
is the English language version of the site. The subdomain's root is pointed to a en sub-directory within main website, like soexample/en
. That sub-directory has its own WordPress administrationde.example
is the German language version of the site. Like the English version, this one's root is also pointed to a sub-directory of the main website -example/de
On the old hosting, each of the websites had its own database.
Then the website was migrated to another host, and due to various limitations of that new host, I was unable to have more than one database. So, I did the following:
- merged all the databases into one
- the main site's database tables kept their
wp_
prefix - the
en
andde
tables received a prefix ofwp_<language>_
. For examplewp_en_posts
, orwp_en_options
, orwp_de_posts
, and so on - the change was done in a text editor (a simple string replace)
- the entire contents of
en
andde
SQL files were then copy/pasted into the SQL file for the main version of the website - the changed SQL file was imported via phpMyAdmin (no errors)
$table_prefix
was adapted forwp-config.php
for subdomains. For example, forexample/en/wp-config.php
, it was$table_prefix = 'wp_en_';
- nothing was changed in respective
.htaccess
files
After the changes, I tested if the site loaded as expected - it did, nothing was broken, and the correct content was displayed. I tested the login to the WP dashboard of the main website, and that was also working.
However, I can't access the WP dashboard for en
and de
versions of the website. I can go to en.example/wp-admin
, fill out the login form, and submit it. Unfortunately, that only redirects me to en.example
, and when I try to go to en.example/wp-admin
, I get the error:
Sorry, you are not allowed to access this page.
Things I've tried
I've checked the cookies created upon logging in to en.example
, and they show the correct sub-domain.
I've also removed almost everything from en.example/en/.htaccess
- the only lines left were the default WP entries. This was done just to eliminate .htaccess
as the possible cause of the problem:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
WP_HOME
and WP_SITEURL
were not explicitly defined in appropriate wp-config.php
language specific files, as I can access the en.example
and de.example
without any problems.
How can I resolve this issue, and access the language-specific WordPress dashboard?
本文标签:
版权声明:本文标题:dashboard - Merging multiple WP databases into one for a multilanguage site prevents access to language-specific WP administrati 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736634745a1945852.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论