{"id":258,"date":"2012-05-17T13:40:55","date_gmt":"2012-05-17T05:40:55","guid":{"rendered":"http:\/\/www.lanchbury.id.au\/?p=258"},"modified":"2012-05-18T22:40:56","modified_gmt":"2012-05-18T14:40:56","slug":"wp-admin-access-problems-after-database-change","status":"publish","type":"post","link":"https:\/\/www.lanchbury.au\/?p=258","title":{"rendered":"wp-admin access problems after database table change"},"content":{"rendered":"<p>So I&#8217;ve moved a WordPress site from one hosting provider to the next, and I didn&#8217;t like the naming of the database tables.\u00a0 So I renamed the tables to something more preferred but then I received the below error message after successfully logging into the admin area.<\/p>\n<h2>You do not have sufficient permissions to access this page error<\/h2>\n<p>The website itself works perfectly right, it&#8217;s just the admin section.\u00a0 Now the whole reason for me posting this is there is heaps and heaps of information about how to solve this problem but because WordPress is written for anybody to easily use, the answer was hidden by lots of people saying the same thing, that and, mentioning database upgrades that had gone wrong.\u00a0 But in this case that wasn&#8217;t the problem.<\/p>\n<p>The resolution, there are some table fields that make reference to the table names some how so when changing the database tables you need to change the below entries too.<\/p>\n<p>You will need to use phpMyAdmin, it&#8217;s normally installed with cpanel, but if its not its really easy to install, just make sure you secure it as many people attempt to hack it.\u00a0 Hopefully with out getting to technical, we will imagine our orginal tables had a prefix of wp_ and we&#8217;ve change them to wp_blog.\u00a0 Add your names as such below.<\/p>\n<p><strong>table<\/strong> , wp_options <em>which would now be<\/em> wp_blogoptions<br \/>\n<strong>&#8211; option_name<\/strong> , wp_user_roles <em>change to<\/em> wp_bloguser_roles<br \/>\n<strong>table<\/strong> , wp_user_meta <em>which would now be<\/em> wp_bloguser_meta<br \/>\n&#8211; <strong>meta_key<\/strong> , wp_capabilities<em> change to<\/em> wp_blogcapabilities<br \/>\n&#8211; <strong>meta_key<\/strong> , wp_user_level <em>change to<\/em> wp_bloguser_level<br \/>\n&#8211; <strong>meta_key<\/strong> , wp_dashboard_quick_press_last_post_id <em>change to<\/em> wp_blogdashboard_quick_press_last_post_id<br \/>\n&#8211; <strong>meta_key<\/strong> , wp_user-settings <em>change to<\/em> wp_bloguser-settings<br \/>\n&#8211; <strong>meta_key<\/strong> , wp_user-settings-time <em>change to<\/em> wp_bloguser-settings-time<\/p>\n<p>Now you&#8217;ll need to make these usermeta changes for every user on your site, hopefully you don&#8217;t have too many.<\/p>\n<p>I hope this is a help as it too me a couple of night to fully understand what was going on.\u00a0 Happy blogging \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;ve moved a WordPress site from one hosting provider to the next, and I didn&#8217;t like the naming of the database tables.\u00a0 So I renamed the tables to something more preferred but then I received the below error message after successfully logging into the admin area. You do not have sufficient permissions to access &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"https:\/\/www.lanchbury.au\/?p=258\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6,4],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-support","category-technical","item-wrap"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7tC7P-4a","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=258"}],"version-history":[{"count":8,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=\/wp\/v2\/posts\/258\/revisions\/266"}],"wp:attachment":[{"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lanchbury.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}