Title: Enable CORS
Author: Dev Kabir
Published: <strong>30 مارس 2023</strong>
Last modified: 20 فوریه 2026

---

جستجوی افزونه‌ها

![](https://ps.w.org/enable-cors/assets/banner-772x250.png?rev=2892361)

![](https://ps.w.org/enable-cors/assets/icon-256x256.png?rev=2889819)

# Enable CORS

 توسط [Dev Kabir](https://profiles.wordpress.org/devkabir/)

[دانلود](https://downloads.wordpress.org/plugin/enable-cors.2.0.2.zip)

[Live Preview](https://fa.wordpress.org/plugins/enable-cors/?preview=1)

 * [جزئیات](https://fa.wordpress.org/plugins/enable-cors/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/enable-cors/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/enable-cors/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/enable-cors/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/enable-cors/)

## توضیحات

Are you tired of dealing with pesky CORS errors on your website? Do you want to 
finally be able to access cross-origin resources with ease? Look no further! This
plugin is here to solve all of your CORS issues. With just a few simple clicks, 
you can enable CORS support on your website and say goodbye to frustrating error
messages. Plus, This tool is easy to use and compatible with all major browsers.
Don’t miss out on this game-changing solution! Try today and revolutionize the way
you access cross-origin resources.

### What is CORS ?

CORS (Cross-Origin Resource Sharing) is a security feature implemented by web browsers
that blocks web pages from making requests to a different domain than the one that
served the web page. This is done to prevent malicious websites from making unauthorized
requests to other websites on behalf of the user.

However, there may be legitimate reasons for a web page to make requests to a different
domain, such as accessing a third-party API or including resources from a CDN. In
these cases, the server that the web page is making the request to can include special
headers in its responses that tell the browser to allow the web page to access the
resources.

If a web page tries to make a request to a different domain and the server doesn’t
include the necessary CORS headers, the browser will block the request and the web
page will receive a CORS error. This can be frustrating for developers, as it can
prevent them from accessing resources they need to build their websites or applications.

### Does the cors error occur on WordPress?

Yes, CORS errors can occur on WordPress websites. WordPress is a content management
system (CMS) that runs on a web server and serves web pages to users through a web
browser. As with any other web page, CORS errors can occur when a WordPress website
tries to make requests to a different domain and the server doesn’t include the 
necessary CORS headers in its responses.

There are several reasons why a WordPress website might encounter CORS errors. For
example, the website might be using a plugin or theme that makes requests to an 
external API or includes resources from a different domain. In this case, the server
hosting the API or resources would need to include the necessary CORS headers in
its responses to allow the WordPress website to access them.

Another possible cause of CORS errors on WordPress websites is if the website is
hosted on a server that has CORS headers disabled. In this case, the website would
not be able to make requests to any other domains, even if the server hosting those
domains includes the necessary CORS headers.

To fix CORS errors on a WordPress website, you will need to either configure the
server to include the necessary CORS headers or modify the website to make requests
to a different domain that does include the necessary headers. It’s also possible
to use a plugin or other tool to enable CORS support on your WordPress website.

### How do I enable cors without a plugin in WordPress?

There are a few different ways you can enable CORS support on a WordPress website
without using a plugin.

Modify the server configuration: If you have access to the server that your WordPress
website is hosted on, you can enable CORS by adding the necessary headers to the
server’s configuration. The exact steps for doing this will depend on the type of
server you are using and how it is configured.

Be aware that modifying the server configuration or adding code to your WordPress
website can have unintended consequences, so it’s a good idea to test any changes
thoroughly before deploying them to a production environment.

### How does your plugin help with CORS support?

This plugin adds support for CORS to your WordPress website, allowing you to specify
which domains are allowed to access your website’s resources, and which types of
requests are allowed. This helps to ensure that your website remains secure while
allowing authorized access to resources from other domains.

**If your site is serving data to others, then This plugin will work. Otherwise,
do not install this plugin, It will be waste of your time only.**

### Why Choose ‘Enable CORS’

 * **Save Time**: No more manual configuration of CORS headers. This plugin does
   it for you.
 * **Improve Security**: Specify which domains are allowed to access your website’s
   resources.
 * **Ease of Use**: This plugin is easy to use and compatible with all major browsers.
 * **Excellent Support**: I offer top-notch **paid support** to assist you whenever
   you need help.

Try ‘Enable CORS’ today and experience the difference!

### Testing Your Setup

 1. **Source Site**:
 2.  * Install and activate the **Enable CORS** plugin.
     * Install and activate the **Cors Tester** plugin.
 3. **Target Site**:
 4.  * Install and activate the **CORS Shortcode Plugin**.
     * It will add a page with a short code `[cors_display]`
     * Edit and save the page content as follows:
        `php [cors_display base_url="http://
       source-site.com"]
     * If you don’t provide a `base_url`, it will default to the target site’s URL.
       So cors will be failed.
 5. **Testing**:
 6.  * Visit the page where you added the shortcode. If everything is set up correctly,
       the current time data from the **Source Site** will be displayed.

For a detailed walkthrough and additional help on testing your configuration, please
refer to the following link: [How to Test Your Setup](https://gist.github.com/devkabir/89972aa28d2302cecf13385be1730eda)

### Note to all users

I appreciate your understanding that this project is pursued in my spare time, outside
of my regular professional commitments. As such, there may be delays in responding
to inquiries or implementing updates. I assure you that I am committed to this project,
as I personally use this plugin for my own website and for several of my clients.
If you are comfortable with this arrangement, I encourage you to install the plugin.
However, if immediate support and frequent updates are crucial for you, I kindly
suggest exploring other options that may better suit your needs.

### Thank You

 * [Dakini](https://profiles.wordpress.org/yanabelle/) and [Irina](https://profiles.wordpress.org/irinashl/)
   for their contributions to the Russian translation.

## نصب

 1. Install & Activate the plugin through the ‘Plugins’ screen in WordPress

## سوالات متداول

### What requests use CORS?

 1. Invocations of the XMLHttpRequest or Fetch APIs, as discussed above.
 2. Web Fonts (for cross-domain font usage in @font-face within CSS), so that servers
    can deploy TrueType fonts that can only be loaded cross-origin and used by web 
    sites that are permitted to do so.
 3. WebGL textures.
 4. Images/video frames drawn to a canvas using drawImage().
 5. CSS Shapes from images.

### Plugin is not working on my site.

I’m sorry to hear that you are experiencing issues with the plugin on your website.

## نقد و بررسی‌ها

![](https://secure.gravatar.com/avatar/6a92082f4ede2c00b5de90fe239942d62f33b276c0e468a78f0daf23665922b5?
s=60&d=retro&r=g)

### 󠀁[Works great](https://wordpress.org/support/topic/works-great-9599/)󠁿

 [abdusalam saheed](https://profiles.wordpress.org/abdusalam-saheed/) 21 می 2025

The plugin works great.

![](https://secure.gravatar.com/avatar/b47fa2da183a37f32cc7925b4737cc2a246331f4bee63991be7bd748f84ce8d3?
s=60&d=retro&r=g)

### 󠀁[Beware](https://wordpress.org/support/topic/incredible-263/)󠁿

 [escapelive](https://profiles.wordpress.org/escapelive/) 3 ژانویه 2025

I do not recommend this – it caused my website to crash – i had to contact my server
provider to assist.

![](https://secure.gravatar.com/avatar/a73434989878f62cd3e27fe7d3b9a73c11bae185720863ad9d6bcfb694fabed6?
s=60&d=retro&r=g)

### 󠀁[Life saver](https://wordpress.org/support/topic/life-saver-443/)󠁿

 [nsbrown](https://profiles.wordpress.org/64tees/) 29 نوامبر 2023

Trying to add these rules to Cloudflare was a mission (didn’t work for me), this
solved my issues. Thank you!

 [ خواندن تمامی 3 نقد و بررسی‌ ](https://wordpress.org/support/plugin/enable-cors/reviews/)

## توسعه دهندگان و همکاران

“Enable CORS” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ Dev Kabir ](https://profiles.wordpress.org/devkabir/)

“Enable CORS” به 1 زبان ترجمه شده است. با تشکر از [مترجمین](https://translate.wordpress.org/projects/wp-plugins/enable-cors/contributors)
برای همکاری و کمک‌هایشان.

[ترجمه “Enable CORS” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/enable-cors)

### علاقه‌ مند به توسعه هستید؟

[Browse the code](https://plugins.trac.wordpress.org/browser/enable-cors/), check
out the [SVN repository](https://plugins.svn.wordpress.org/enable-cors/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/enable-cors/) by
[RSS](https://plugins.trac.wordpress.org/log/enable-cors/?limit=100&mode=stop_on_copy&format=rss).

## گزارش تغییرات

#### 2.0.2 – 10-07-2025

 * Removed vulnerable SweetAlert2 library and replaced with secure Notyf notifications

#### 2.0.1 – 14-06-2025

 * Updated WordPress compatibility to version 6.8

#### 2.0.0 – 10-03-2024

 * Improved security checks for safer requests.
 * Better support for preflight requests to fix CORS issues.
 * Optimized allowed methods and headers for smoother API calls.
 * Removed unnecessary code to boost performance.
 * Checked and confirmed compatibility with PHP 8.4.

…

#### 1.0.0 – 28-03-2023

 * Added support link on the settings page.
 * Added automate support system.
 * Added support for ajax.
 * Added link for customer support.
 * Added support for Font & Images issues.
 * Added support for api redirection.
 * Added support for image rendering issues.
 * Added multiple website options.
 * Added request method check.
 * Note:: This plugin does not help on Google Analytics issues.

## اطلاعات

 *  نگارش **2.0.2**
 *  Last updated **3 ماه پیش**
 *  نصب‌های فعال **6,000+**
 *  نگارش وردپرس ** 4.7 یا بالاتر **
 *  Tested up to **6.9.4**
 *  نگارش PHP ** 7.1 یا بالاتر **
 *  زبان‌ها
 * [English (US)](https://wordpress.org/plugins/enable-cors/) و [Russian](https://ru.wordpress.org/plugins/enable-cors/).
 *  [به زبان خودتان ترجمه کنید](https://translate.wordpress.org/projects/wp-plugins/enable-cors)
 * Tags
 * [ajax](https://fa.wordpress.org/plugins/tags/ajax/)[cors](https://fa.wordpress.org/plugins/tags/cors/)
   [enable](https://fa.wordpress.org/plugins/tags/enable/)[error](https://fa.wordpress.org/plugins/tags/error/)
   [fix](https://fa.wordpress.org/plugins/tags/fix/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/enable-cors/advanced/)

## امتیازها

 3.7 از 5 ستاره.

 *  [  امتیاز 2 5-ستاره     ](https://wordpress.org/support/plugin/enable-cors/reviews/?filter=5)
 *  [  امتیاز 0 4-ستاره     ](https://wordpress.org/support/plugin/enable-cors/reviews/?filter=4)
 *  [  امتیاز 0 3-ستاره     ](https://wordpress.org/support/plugin/enable-cors/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/enable-cors/reviews/?filter=2)
 *  [  امتیاز 1 1-ستاره     ](https://wordpress.org/support/plugin/enable-cors/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/enable-cors/reviews/#new-post)

[مشاهده همه بررسی‌ها](https://wordpress.org/support/plugin/enable-cors/reviews/)

## مشارکت کنندگان

 *   [ Dev Kabir ](https://profiles.wordpress.org/devkabir/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/enable-cors/)

## کمک مالی

آیا تمایل دارید از پیشرفت این افزونه حمایت کنید؟

 [ کمک مالی به این افزونه ](https://www.buymeacoffee.com/devkabir011)