Skip to content
WordPress and WooCommerce4 min read

How to set up WordPress for Arabic and right-to-left (RTL)

Short answer

To run WordPress in Arabic, choose "العربية" under Settings > General > Site Language; the dashboard and front end switch to right-to-left automatically if the theme supports it. Then use a theme that ships an rtl.css file, add a readable Arabic font, and make sure the database uses utf8mb4.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Before you start
  2. Steps
  3. Troubleshooting
  4. On ArabyHost

WordPress has supported Arabic properly for years: the translation is official, and RTL is built into the dashboard and block editor. Whether the site looks right to visitors, though, depends on your theme, fonts and plugins, and that’s where most problems appear. These steps go from a basic switch to a full bilingual site.

Before you start

  • A WordPress site (see install WordPress) and an Administrator account.
  • A backup before switching themes or installing translation plugins.

Steps

1. Switch the site language to Arabic

Under Settings > General, choose العربية in Site Language and click Save Changes. WordPress downloads the language files, the dashboard and front end flip to right-to-left, and the theme outputs <html dir="rtl" lang="ar">.

If some strings stay in English, go to Dashboard > Updates and click Update Translations at the bottom of the page.

2. Choose the dashboard language per user

Each user can set their own dashboard language in the Language field under Users > Profile. That’s useful when a developer who doesn’t read Arabic works on the site while visitors keep seeing Arabic.

3. Use an RTL-ready theme

A theme that supports Arabic ships an rtl.css file or uses logical CSS properties (margin-inline-start instead of margin-left). To check:

  • In the WordPress theme directory, look for the RTL Language Support tag on the theme’s page.
  • After activating it, open the menu, dropdowns, cart and contact forms, and confirm icons and arrows point the right way.
  • Test on a phone; many direction bugs only show in the mobile menu.

Read about WordPress themes before buying one, and ask the seller directly about RTL support.

4. Add a readable Arabic font

Many themes’ default fonts don’t suit Arabic. Pick a readable Arabic typeface such as IBM Plex Sans Arabic, Noto Naskh Arabic, Cairo or Tajawal and set it in the theme options if available. Otherwise add CSS under Appearance > Customize > Additional CSS in classic themes, or in Styles in the Site Editor for block themes:

html[dir="rtl"] body {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  line-height: 1.8;
}

A slightly taller line height makes Arabic easier to read. For speed, host the font files on your own site rather than loading them from a third party, and use two or three weights at most.

Under Settings > Permalinks choose Post name. Each post’s URL is then built from its Arabic title: it displays in Arabic in the browser but becomes a long encoded string when copied. If you want short English URLs, type them into the post’s Slug field before publishing. Never change the URL of a published post without a 301 redirect.

6. Check the database encoding

Arabic needs utf8mb4. Open wp-config.php and confirm:

define( 'DB_CHARSET', 'utf8mb4' );
define( 'DB_COLLATE', '' );

In phpMyAdmin, WordPress tables should use a collation such as utf8mb4_unicode_ci or utf8mb4_unicode_520_ci. See utf8mb4.

7. Handle mixed-direction text

A phone number or English code inside an Arabic sentence can flip or push punctuation around. In the code editor or a Custom HTML block, wrap that part in an element with an explicit direction:

<span dir="ltr">+966 5X XXX XXXX</span>

For inputs where visitors may type either Arabic or English, use dir="auto".

8. Build an Arabic and English site

For a bilingual site, use a translation plugin such as Polylang, WPML or TranslatePress. They create a version of each page per language with its own URL (such as /en/), add hreflang tags so Google understands how the pages relate, and switch between RTL and LTR automatically. Don’t rely on machine translation alone for important pages.

9. Translate theme and plugin strings

If buttons such as “Read more” or “Add to cart” stay in English, the theme or plugin lacks a complete Arabic translation. Install Loco Translate, open Loco Translate > Themes or Plugins, pick the item, create a new Arabic language and fill in the missing strings. Save to the Custom languages folder so updates don’t wipe your work.

Troubleshooting

  • Front end still left-to-right after switching language: the theme doesn’t support RTL, or a cache plugin is serving an old copy. Purge the cache and compare with a default theme.
  • Direction problems in Elementor: pages designed before the switch may keep hard-coded left alignment. Check alignment settings section by section; see Elementor.
  • ???? or characters like ال instead of Arabic: an encoding problem. See MySQL 1366 Incorrect string value and re-import the database as utf8mb4.
  • WooCommerce text in English: update translations from the Updates page, then set the currency position in the store settings.

On ArabyHost

On ArabyHost, WordPress installs in one click from the Araby Panel, which is available in Arabic and English, with PHP 8.1 to 8.3 and a MySQL/MariaDB database. Sites run on a LiteSpeed web server with LiteSpeed Cache, so remember to purge the cache after changing the theme or fonts. Building an Arabic store? See build a WooCommerce store and the WordPress hosting plans. Support is available in Arabic.

FAQ

Are Arabic URLs good for SEO in WordPress?

Google reads Arabic URLs fine, but they turn into long percent-encoded strings (like %d8%a7...) when copied and shared. Pick one style, short Arabic slugs or English slugs you type by hand, and stick to it.

How do I keep the dashboard in English while the site is in Arabic?

Set the site language to Arabic under Settings > General, then pick English in the Language field under Users > Profile. That changes only your own account; visitors still see Arabic.

Why does Arabic text show as question marks?

Usually the database tables or the connection aren't using utf8mb4, which tends to happen after a migration or an SQL import with the wrong encoding. Check that DB_CHARSET in wp-config.php is utf8mb4 and re-import with the right encoding.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.