See the best WordPress Black Friday Deals collection and get massive savings on your favorite WordPress services, themes, and plugins! View Deals

Professional WordPress themes for your business and personal sites

Home Blog How to enable Right-to-left (RTL) support in WordPress

How to enable Right-to-left (RTL) support in WordPress

Last updated: 8 Comments

It should no surprise that the world’s most popular content management system has robust support for dozens of languages. What it surprising is the lack of simple instructions on how to enable Right-to-left (RTL) support in WordPress for RTL languages. So here’s a quick guide on how to enable RTL support for your WordPress website.

TL;DR – Don’t fancy reading? Here’s the video tutorial 🙂

Step 1 – Ensure your WordPress theme has RTL support

This is your crucial first step. Login to your website control panel and go to /wp-content/themes/yourtheme and look for a file called rtl.css. If you’ve got one chances are pretty good that your theme has RTL support. Go ahead and open it up to ensure the author simply hasn’t created an empty css file 🙂

Step 2 – Test RTL support

Before we make a permanent switch to RTL mode, let’s test it out as an admin – in that way we can safely preview RTL support before making it available to all our website visitors.

Go to Plugins -> Add New and search for “RTL Tester” – or you can grab the plugin over on the WordPress.org repo.

Once you install the plugin you’ll see this new option in your WP toolbar

RTL Tester WordPress plugin

Once you click “Switch to RTL” the WordPress user interface switches to RTL mode.

RTL Tester in WordPress admin

If you go to your website frontend you should also see that it now displays Right-to-left. Here’s what the Success WordPress theme looks like with RTL enabled.

Success WordPress Theme with RTL enabled

Step 3 – Enable RTL Support permanently

Once you’re happy with how your website looks with RTL mode enabled, it’s time to make the switch permanent.

Open up your wp-config.php and add the following:

In this case, “ar” refers to the Arabic language. Check out the full list of ISO language codes.

Then hop on over to Settings -> General -> Site Language – and select your language.

Enabling RTL support in WordPress settings
Enabling RTL support in WordPress settings

Hit “Save Changes” and you’re done!

When you go to your website you should now see RTL mode is enabled.

Check out our video tutorial which shows the process in detail.

Follow us on Twitter and Facebook!

Stay connected – be the first to get interesting updates and new releases from Create and Code.

Colm has been building web stuff since the web was a wee lad. Colm built his first blog with WordPress around 2007 and has been hooked ever since. When not knee deep in hooks and filters you'll probably find him running around a mountain or making pizza.

8 comments

  1. Hi Colm, great tutorial, thanks for sharing! 🙂 Fortunately most of the premium WordPress themes out there include RTL support already. We’ve written an article covering as well information on how to create WordPress sites for RTL languages, we’d be happy to have your feedback 🙂 https://goo.gl/kpgw65

  2. Very helpful. Thanks Colm Troy.. and it seems that the new wp version doesn’t require defining the new parameter in the php file.

  3. Hello Calm Troy,

    Thank you for sharing the useful information.

    In terms of content, do I need to take any precautions regarding alignment or the theme will automatically handle it?

    What do you say?
    Thank you.
    Somnath

  4. I there, I am trying to create content in Hebrew but my WP site is in English. I have all the texts but I am totally unable to find a way on to how allign RTL with hebrew text for my site. Could you help?

  5. I think if the theme supports RTL, you don’t have to add define (‘WPLANG’, ‘ar’); to the wp-config.php file at all. You can skip this step and just change the site language to Arabic by going to Settings -> General -> Site Language .

    Works with me every time.

Leave a Reply

Your email address will not be published. Required fields are marked *