Posts Tagged ‘ wordpress

Multiple Domains with Single WordPress

This day i did a good work with wordpress multi domain with single wordpress site. I think most of the beginners developers and programmers dont know about  this. But now all guys will know how to do the multi site with single hosting( wordpress ). I would like to show you how to do that.

Ex. if you have two domains. You want to control the all contents with single  back-end for both sites, its possible with wordpress.

First install the wordpress in your primary domain hosting server.

Then Both sites nameserver should be point the primary domain server. Both sites must be point primary site folder(Already you installed wordpress in this location).

Now go to root of the site. Here you can see the wp-config.php. Open the file via ftp or file manager.

Open the file wp-config.php, add the following code :

$_asdfasdf_myurl = ‘http://’.$_SERVER['HTTP_HOST'];
define(‘WP_HOME’, $_asdfasdf_myurl);
define(‘WP_SITEURL’, $_asdfasdf_myurl);
unset($_asdfasdf_myurl);

We know,  PHP $ SERVER [ HTTP_HOST ]  for obtaining source domain. So,  according to WP_HOME and WP_SITEURL from variable assignment, realize Multiple Domains with Single WordPress.

In order to prevent the picture is not available  caused by the domain name change , you must set ” Options-media-Store uploads in this folder “  to “  wp-content / uploads”  ( as ” the default upload path” the same parameters ).

Now primary domain and secondary loads with single wordpress. You can do multiple domain like this way.

If you have any questions let me know. I can help you.

Moving WordPress To A New Domain

Every time I move a WordPress website to a new domain name or url (eg: moving it from a testing site to a live site) I can always count on one thing: my ability to forget the SQL statements to update the urls.

My problem isn’t so much forgetting that I have to do it, but actually forgetting the code itself. Even worse, I haven’t actually documented the code anywhere so I can’t just copy and paste it from somewhere else.

The 3 lines of code really aren’t much to remember, I mean, they are simple and very logical. It’s virtually a find and replace of the old urls to the new urls but for some reason everytime I need it my head just goes blank. Sure I could probably do a find and replace in the SQL dump of the database before the import, but in the past I have faced issues doing it this way for some reason.

For future reference, here is the code:

UPDATE wp_options SET option_value = replace(option_value, ‘THEOLDURL’, ‘THENEWURL’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; UPDATE wp_posts SET guid = replace(guid, ‘THEOLDURL’,'THENEWURL’); UPDATE wp_posts SET post_content = replace(post_content, ‘THEOLDURL’, ‘THENEWURL’);

It happened again the other day and I’m tired of it, so I decided to do something about it. No, I didn’t memorise the code because well, lets face it, I really should know it already but for some reason it won’t stick. Instead I created a little website which will do it for me. Besides, I figured I can’t be the only person who makes this mistake, so why not help other people out too?

Welcome, Here you simply enter your current WordPress site url (eg: http://localhost) followed by the destination url (eg: http://wjd.in) and click the generate button. It then spits out the SQL code you need to run. Easy as pie.

Also, I figured I might as well provide some general instructions on how to manually move, backup or restore a WordPress website, so I added that too. It is all text right now, but I’ll hopefully clean it up, throw in some images and just make it nicer to read overall.

So that’s it, the next time you are migrating a WordPress website, head on over to Moving WordPress and shave that whole 5-10 minutes off your workload. I know I’ll be using it.

Microsoft Live Spaces Closing, Sends Users to WordPress

Microsoft officially close Live Spaces

From a business perspective, it’s a bunch of blogs migrating from one free platform to another. But from an infrastructure perspective, Microsoft’s decision to close Windows Live Spaces and offer its millions of bloggers an “upgrade” to WordPress.com has larger implications.

Microsoft announced its Live Spaces transition plan yesterday at TechCrunch Disrupt. Live Spaces users will have the option of migrating their blogs to the WordPress.com service from Automattic. Microsoft says it has worked closely with WordPress.com to design a seamless transition process. But despite Microsoft’s language about upgrades and partnerships, the reality is that Live Spaces users have six months to move their blogs or have them deleted.

Worepress:Welcome Windows Live Spaces Bloggers

WordPress published a blog “Welcome Windows Live Spaces Bloggers”,this blog revealed to us that Windows Live Spaces users will have the option to move their blogs to WordPress.com over a six month period , beginning today.

WordPress said:”We’re very happy that Microsoft chose WordPress.com as their preferred new blogging service for Windows Live users. It’s a sign of how strong WordPress.com has become, and credit for that goes to every one of you who’s been creating here.”

More Capacity for WordPress.com?

Microsoft has clearly decided that there’s limited upside to innovation in blogging platforms. In announcing its plans to shutter Live Spaces, it acknowledged that the platform’s features were falling behind the offerings at WordPress.com.

Still, it was a little disorienting to read Microsoft’s announcement that it was migrating millions of sites from Windows Server to a platform powered entirely by open source software, and describing it as an “upgrade.”

It’s likely that the Live Spaces migration will impact the Netcraft Web Server Survey, which tracks market share for leading server products. WordPress.com uses the nginx server, which currently powers about 5 percent of sites found by Netcraft, a state that figures to gain as Microsoft’s share declines.

Live Spaces’ demise also serves as a reminder that the free hosting services offered by the largest tech companies haven’t crushed competition, as was feared by some in the web hosting sector. “Four years ago I was fairly worried as every internet giant (Microsoft, AOL, Yahoo, Google) had a hosted blogging service,” wrote Mullenweg. “Now only Blogger remains, and is firmly in our sights.”

Now,let’s say goodbye to Spaces!

Double domain of WordPress

Can WordPress binding double domain?Most people will tell you not,but I have a unique skill to set it,now, follow me!

Suppose you have two domain such as abc.com and efg.com,and then you must open your FTP services.

Open your wordpress dir and find out the file “wp-config.php” and add some code as follow:

$_asdfasdf_myurl = ‘http://’.$_SERVER['HTTP_HOST'];

define(‘WP_HOME’, $_asdfasdf_myurl);

define(‘WP_SITEURL’, $_asdfasdf_myurl);

unset($_asdfasdf_myurl);

Then,you can also edit the URLs in wordpress data table by run the SQL statement “update TABLENAME  set FIELDNAME = replace (FIELDNAME,’EFG.COM’,'ABC.COM’)”. This statement means replace “ABC.COM” from “EFG.COM” in FIELDNAME , TABLENAME.

Up to this, your wordpress can binding double domain ,now, go and set the Domain !

Hello world!

Through the efforts in a period of time, wjd.in finally meet with you. This is my first blog in English,and I hope dear all can pay attention to it,which is the english version of my chinese-language blog. Here, I will write down more exciting contents.

This blog focuses on web design , user experience , internet marketing , web hosting , etc.You may ask me why I set this English blog?My answer is:

  • Fuck GFW in pratice.
  • I love United States.
  • I would like to train English.
  • My Chinese-language blog shut down.
  • Chinese is unsafe.

In the future, I will do my best to update the blog three times a week.The articles here maybe are no as same as my chinese-language blog.If you are interested in my life, you can also concerned about as follow sites:

  • wjd.name My Chinese-language blog, can not access in China.
  • wjd.im My Chinese-language blog in China’s temporary image,future as my navigation site.
  • wintbros.com Future as my navigation site,too.