I have been building a WordPress-based website in my localhost (‘localhost/dzup_online/wordpress’) for a week now and I have been accessing the Dashboard several times now without fail. (Theme: Twentysixteen (default))
I installed another WordPress site for checking out other themes (‘localhost/dzup_online_4/wordpress’). (Theme: Clean Journal Child theme (user-made))
Since working on the ‘dzup_online_4’ website, I decided to make it my main website so I switched the names of their root directories (‘dzup_online’ <- -> ‘dzup_online_4’)
Of course, my website broke so I had to update wp-config.php to change ‘DB_NAME’, ‘DB_USER’ and $table_prefix (‘wp_’ -> ‘dzup_wp’) to point to the other database and database user. (The passwords for both database users are the same) (I also did the same for the other website) I also added the correct privileges for the database for each database user.
I updated ‘dzup_wp_options’ in the database for the ‘option_name’s ‘siteurl’ and ‘home’ to reflect the new root folder name for the website.
I renamed the database tables to be prefixed with the name $table_prefix (‘dzup_wp_’).
I also replaced the ‘guid’s of the posts in ‘dzup_wp_posts’ with the new root folder name.
At this point, I can access my home page quite fine and can access my Dashboard as an administrator.
I tried switching pages and found out that I had to modify my .htaccess too. This is the new content:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dzup_online/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dzup_online/wordpress/index.php [L]
</IfModule>
# END WordPress
I refreshed the page and suddenly, I do not see the Dashboard menu button in the Admin Bar anymore.
I reverted back to my old .htaccess but my administrator account seems to have still lost administrator rights.
I tried adding a new user through this tutorial but the newly added user still cannot access the Dashboard.
I renamed the ‘meta_key’s in ‘dzup_wp_usermeta’ table to have the new table prefix at the start with the following values:
dzup_wp_capabilities a:1:{s:13:”administrator”;b:1;} dzup_wp_user_level 10
For both user accounts, I still do not have administrator rights.
I hope you can help me with this. Thanks!
wp_user_roles
todzup_wp_user_roles
?