2 site dùng chung table user

B1:Cài đặt 2 site bình thường (nhưng phải đặt khác prefix_)
B2:Export data site 2 và import vào data của site 1
B3:Mở file wp-config.php của site 2 lên chỉnh lại các thông số kế nối đến data của site 1 và đông thời thêm các các thông số sau:
$table_prefix = ‘wpads_’;
define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);
B4:vào phpmyadmin chọn data site 1
-Chọn table option: truy vấn
select * from wp_1_options where option_name like ‘wp_1_%’; và copy wp_1_user_roles để tạo một option wp_2_user_roles
-Chọn table table wp_1_usermeta: truy vấn select * from wp_1_usermeta where meta_key like ‘wp_1_%’; và copy wp_1_capabilities tạo wp_2_capabilities

Chili Comment. Giấy phép không hợp lệ. Kích hoạt tại đây

Gửi Phản Hồi
Chọn đánh giá của bạn
0 Bình Luận
Thông tin người gửi
Anh Chị


Super-flatsome

Hướng dẫn thiết kế theme

Các functions thường dùng

  • Hotline: 0912 889 416

  • Fcwordpress trên facebook Fcwordpress trên Twitter Fcwordpress trên youtube

Mọi sự sao chép xin ghi rõ nguồn là fcwordpress.net

Chuyên trang về wordpress: hướng dẫn thiết kế theme, plugin, thủ thuật wordpress