Many newbies started their blogging journey with self hosted wordpress blogs, in the beginning stage we are not thinking about the search engine optimization. recently i found many bloggers asking about the best URL structure for wordpress , someone saying if we are adding www in front of the blog url, its very good for SEO , its true or not , i’m getting many requests and questions regarding the change of non www wordpress blog to www.
With WordPress you either use www or you don’t use www, either way it redirects you to the one you chose to use. If you choose to use www and someone goes to http://bloggerstips.com , it will redirect to http://www.bloggerstips.com. The same is true the other way around.
the changing or adding process of the www in front of the domain, its very easy process, but some situations id very difficult to do, because the change has removing the access to the wp-admin.
here i’m going to share the easiest and safest ways to add or change www to non www wordpress websites.
These process only for wordPress single sites. If you are using wordPress multiSite, you will need to manually edit your database. , i will share the process for multisite verysoon.
Method 1 – through wordpress dashboard
Login to your WordPress admin dashboard and navigate to the Settings > General
then add www in the wordpress address and site address field.
If you have hard coded links in your website or blog they will still point to the domain without www and in this case you might need to go through each and every link and change it.
Method 2 – through phpmyadmin
major hosting providers like hostgator , bluehost providing phpmyadmin access through cpanel. if you are not using cpanel , take help from your webhosting provider to do the database editing.
1) Select your correct database from the list ( you can found many default databases like tes)
2) select wp_options (if your table prefix is BS , the same is showing bs_options)
3) click the check box and click on edit
4) you can found a table named option_value
5) add your full domain in option_value
6) Scroll to the bottom and click “Go” to save the change
we need to do the same in home url also , to do that in the same database , we can found on table called home under the wp_options , select the table and do all the process mentioned above.