Get 20% off all of our individual Pro themes or grab the entire club! Just use the coupon code CCTHEME20

Discover our superb new professional blogging WordPress theme, Jefferson Pro

Get the latest Create and Code updates and offers every month
Home Blog WordPress Themes How to enable Right-to-left (RTL) support in WordPress

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

2 Comments

How to enable Right-to-left (RTL) support in WordPress 2 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.

Subscribe to Create and Code via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

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.

2 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

Leave a Reply

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

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match