Recover WordPress blog from an inactive domain name

If you have problems to log even into your blog, edit wp-config.php: Add these two lines to your wp-config.php, where “example.com” is the NEW location of your site. define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’,’http://example.com’); This will at least make it useable again (but won’t fix links inside post and page content, see Ticket #4003). . Additionally you can add … Read more

Moving WordPress.com theme and widget settings to self-hosted site?

First off, check if the theme is available in wordpress.org themes: http://wordpress.org/extend/themes/ If it’s not, find the name of the theme developer and contact them. Many developers of wordpress.com themes are happy for people to use their themes on self-hosted WordPress blogs. The developer’s name and contact details can be found by looking at style.css. … Read more

Best way to import users, post and categories from an external database

Unless there is a core WordPress import filter available for your CMS ( see http://codex.wordpress.org/Importing_Content ) or a plugin for a CMS not covered by core WP ( see http://wordpress.org/extend/plugins/search.php?q=import ), or a Google search for your database schema doesn’t reveal anything, you need to roll your own importer. The best way is to write … Read more

Migrating data between local and development server

Assuming your wp-config.php is already in place and in order: Step 1. Mysqldump your development database Step 2. Replace all instances of development.domain.com to production.domain.com^^ Step 3. Login to MySQL, run a SOURCE command to import data e.g. source /path/to/file ^^ How to replace all instances of old domain with new: (1) Copy the script … Read more

Migration issue – blog home page is blank

My experience with blank home page. Sometimes when you are migrating your page you can get blank home page. I found the problem with the home page not displaying from the base URL. it was because there was a default.html file in the root directory. The old hosting server must had set the order to … Read more

URL rewrite based on a custom field value

here is an idea, first add lid to query_vars: add_filter(‘query_vars’, ‘lid_query_vars’); function lid_query_vars($vars) { // add lid to the valid list of variables $new_vars = array(‘lid’); $vars = $new_vars + $vars; return $vars; } then use parse_request hook to create your redirect add_action(‘parse_request’, ‘lid_parse_request’); function lid_parse_request($wp) { // only process requests with “lid” if (array_key_exists(‘lid’, … Read more

How to transfer a WordPress blog to a different domain?

I recommend handling the 301 redirect in your web server rather than in WordPress. mod_rewrite or RedirectMatch will be much more efficient than spinning up WordPress to deliver a Location: header. <VirtualHost *:80> ServerName busted-cheap-url.com # mod_alias RedirectMatch permanent (.*) http://great-new-url.com$1 # OR mod_rewrite RewriteEngine on RewriteRule (.*) http://great-new-url.com$1 [R=301] </VirtualHost> There are several methods … Read more