3

I'm migrating a Joomla 1.5 site to a WordPress 3.1 site (I will later update to WP 3.2.x) and I've found the right tool to do it, a plugin called Joomla 1.5 Importer. There is another plugin called Joomla/Mambo To WordPress Migrator that works better except for one problem: there's no way to correct the database charset. The site is in Spanish, and some special characters are not shown correctly.

After usin the Joomla 1.5 Importer I've got my posts in place, but there is a permalink issue. Our current Joomla site has a permalink structure that includes the article's id:

http://www.myjoomlasite.com/tech/news/8182-title-of-the-article.html

But after applying the plugin the WordPress' article permalink is the following:

http://www.mywordpress.com/tech/news/title-of-the-article.html

You see? There's no number at the beginning of the last part of the permalink. I guess I would need a Rewrite Rule in Apache for my .htaccess to solve the issue, but I don't know what would be the right one. I just need to "delete" the "id-" part of the permalink.

4
  • Are you already redirecting myjoomlasite.com/specificpage to mywordpress.com/specificpage? Or are is in fact the domain staying the same and you're just using those domains to clarify which site is which? Commented Aug 4, 2011 at 8:57
  • Yes, the domain is the same, I just wanted to clarify which site (Joomla/Wordpress) is which. Thanks for the comment.
    – javipas
    Commented Aug 4, 2011 at 9:32
  • Is it always tech/news or could there be other words there? Commented Aug 4, 2011 at 12:13
  • There are going to be other words (category/subcategory) there. So I only need to delete the "8182-". In fact, the number can go from 1 to 9999. I need to get rid of this number...
    – javipas
    Commented Aug 5, 2011 at 8:25

3 Answers 3

3

This should do it

RewriteRule ^(.*)/(.*)/[0-9]\-(.*)$ http://yoursite.com/$1/$2/$3
1

I managed to get it working for my recent Joomla -> Wordpress translation by using a variation of @paulmoriss's rewrite:

RewriteEngine On
RewriteRule ^(.*)/[0-9]+\-(.*)$ http://yoursite.com/$1/$2 [L,R=301]

Note: I only had one level of category, hence I only capture two parts of the original URL. Beyond that, I think @paulmorriss is missing a '+' character on the identifier clause, and the final [L] or [L,R=301]. I wanted a permanent redirect - hence the 301.

0

You can use CMS2CMS web service to move Joomla content to WordPress -it preserves the internal site navigation totally, plus, there's an option to make your links SEO friendly.

What it means, you just set the desired rewrite rules in your WordPress .htaccess, and all the internal links will be formed according to this structure. Then, you will just have to 301 redirect the most important pages.

Disclaimer: I am a marketing manager at CMS2CMS.

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.