0

I worked on a Drupal site for a client, but he wanted to keep his blog on WP, so I manually created a 'blog' folder on the root of the Drupal site and moved all the WP content there. I uploaded the database and change the wp-config.php settings accordingly.

The main Drupal site (example.com) works fine, and when I click on the blog link I'm taken to the front page of the blog like it's supposed to, but inside the blog, (example.com/blog), any other link I click will show a 'page not found' message as if I was looking for non existing content on the main site.

I'm not very familiar with WP. Is it because I installed manually? what configuration am I missing?

EDIT:

I tried

define('WP_HOME','http://example.com/blog/');
define('WP_SITEURL','http://example.com/blog/');

on wp-config.php, but that didn't work.

1
  • For the URLs, once imported to your new site use wordpress.org/extend/plugins/search-and-replace to fix the URLs
    – Tara
    Commented Sep 6, 2014 at 4:46

2 Answers 2

2

make a backup of your SQL database for the site and try running these queries manually on the database through php myadmin. change the URLs to match your site http://example.com/blog

As always, be careful when running queries on the database

 UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

 UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

 UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

 UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
0

There will not be trailing slash in your code.

define( 'WP_HOME', 'http://example.com/blog' );
define( 'WP_SITEURL', 'http://example.com/blog' );

Although changing these values permanently in database is a good idea too.

Also visit your permalink settings page and save options again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.