Category Archives: wordpress

Adding a WordPress user via MySQL Database

This article will walk you through the process of creating an admin user in WordPress through your WordPress MySQL database.

First and foremost: backup your database before performing any MySQL edits.=

Second login to phpMyAdmin and find your WordPress database

PHP My Admin

 

 

 

Once you are logged in go to Insert

 

We need to insert our new admin user’s information, so click on the Insert tab like it shows in the image above. In the insert form, add the following:

  • ID – pick a number (in our example, we will use the number 4).
  • user_login – insert the username you want to use to access the WordPress Dashboard.
  • user_pass – add a password for this username. Make sure to select MD5 in the functions menu (Refer to the screenshot below).
  • user_nicename – put a nickname or something else that you would like to refer yourself as.
  • user_email – add the email you want to associate with this account.
  • user_url – this would be the url to your website.
  • user_registered – select the date/time for when this user is registered.
  • user_status – set this to 0.
  • display_name – put the name you like to display for this user on the site (it can be your user_nicename value as well).
  • Click on the Go Button

================

Next we are going to have to add the values to wp_usermeta table. Click on the wp_usermeta table and then click on the Insert tab just like the previous step. Then add the following information to the insert form:

  • unmeta_id – leave this blank (it will be auto-generated)
  • user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
  • meta_key – this should be wp_capabilities
  • meta_value – insert this: a:1:{s:13:”administrator”;b:1;}

Insert another row with the following information:

  • unmeta_id – leave this blank (it will be auto-generated)
  • user_id – this will be the id of the user you created in the previous step. Remember we picked 4.
  • meta_key – this should be wp_user_level
  • meta_value – 10

Then click on the Go button, and you have created yourself a new username. Now you should be able to login to your wp-admin with the username and password you specified for this user. Once logged in, click on Users and edit the username you just created. Go down and click on the Save button (you don’t have to change anything). This will allow WordPress to go through and add some more information and clean-up the user we just added.

how to use permalinks to enhance your wordpress seo

Why change my SEO permalink structure to /%category%/%postname%/?

This permalink structure allows you to have ‘more’ keyword loaded into the URL of your post. Since the category that you’ve placed your post under usually related to the post title (which hopefully is keyword-loaded itself), you will have the extra SEO benefit if other people use that permalink structure to link your post.

By default, WordPress gives you this dynamic URL for your post: “http://yourdomain.com/?p=SOME-ID-NUMBER”. The best SEO permalink structure is to have your post appears with ‘category’ and the ‘post title’ in the URL.

This looks something like this: “http://yourdomain.com/category/post-title”

How do I Change the Default Permalinks to ‘Category/Post-Title’ Permalinks

In order to change the default permalink structure, you need to go to “OPTIONS -> Permalinks” in your admin panel and paste this code into the BOX after “Custom Structure:”

/%category%/%postname%/

Next, click the “Update Permalink Structure >>” button; if WordPress does NOT automatically update the permalink structure to for you–don’t worry–just do the following:

-If you don’t have a .htaccess file in your root directory (public_html/.htaccess) already, just ‘create a new file’ and name it .htaccess and place it in “public_html” directory or whatever directory you have your WordPress blog installed (e.g. public_html/blog/.htaccess, which is equivalent to yourdomain.com/blog/.htaccess).

-Then, copy and paste the code WordPress gives you after clicking on the “Update Permalink Structure >>” button into your .htaccess file. *Note: You need to click on the some option (e.g. ‘Edit’) of your .htaccess file to open up a window to paste your permalink code in the file.

The code is same as following if you are using WordPress 2.0 or higher:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Just copy and paste that ‘mod-rewrite’ code into your .htaccess file, save it, and you are DONE!

Now, your old AND new post will automatically carry the category the post is assigned to, plus the title name of that post:

http://yourdomain.com/blog/category/post-title

*Note: That’s the default ‘Post-Slug’ structure after the updated permalink, but if you want to change the name of the ‘post-title’ in the post’s URL, just go to ‘Post-Slug’ (located on the right-hand side of the “Write” page) and input/change to what name you want.

If you have any question, just post a comment below…