Title: Make Paths Relative
Author: Sami Ahmed Siddiqui
Published: <strong>16 Tháng 6, 2016</strong>
Last modified: 22 Tháng 7, 2025

---

Tìm kiếm plugin

![](https://ps.w.org/make-paths-relative/assets/banner-772x250.png?rev=1796226)

![](https://ps.w.org/make-paths-relative/assets/icon.svg?rev=1785376)

# Make Paths Relative

 Bởi [Sami Ahmed Siddiqui](https://profiles.wordpress.org/sasiddiqui/)

[Tải về](https://downloads.wordpress.org/plugin/make-paths-relative.2.1.0.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/make-paths-relative/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/make-paths-relative/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/make-paths-relative/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/make-paths-relative/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/make-paths-relative/)

## Mô tả

This powerful plugin simplifies website maintenance by automatically converting 
absolute paths (URLs) for resources like links, scripts, stylesheets, and images
to relative paths. This ensures your website functions flawlessly regardless of 
its location on a server or domain.

### Enhanced Efficiency and Flexibility

 * **Seamless Relocation:** Move your website with confidence, knowing all paths
   will adjust accordingly, preventing broken links and preserving a seamless user–
   experience.
 * **Centralized Control:** Update paths once in a central location, eliminating
   the need for tedious, site-wide modifications.
 * **Potential Performance Boost:** Relative paths can, in some cases, improve website
   loading times.

### Whitelist Your Domains (Optional)

For extra control, you can specify a list of domains that will always be converted
to relative paths. This ensures internal links are always optimized while allowing
external resources to function properly.

### Embrace a Streamlined Approach

This plugin empowers you to focus on creating exceptional content while eliminating
the burden of managing absolute paths. Take control, optimize your workflow, and
ensure your website’s continued success!

### Filters

If you want to make plugin works and all the paths relative without going to check/
visit Settings Page so, just add this line in your theme’s `functions.php`.

    ```
    add_filter( 'make_paths_relative_activate_all', '__return_true' );
    ```

**Note**: Make sure to check the settings Page.

### Bug reports

Bug reports for **Make Paths Relative** are [welcomed on GitHub](https://github.com/yasglobal/make-paths-relative/issues/).
Please note GitHub is not a support forum, and issues that aren’t properly qualified
as bugs will be closed.

## Cài đặt

This process defines you the steps to follow either you are installing through WordPress
or Manually from FTP.

### From within WordPress

 1. Visit ‘Plugins > Add New’
 2. Search for Make Paths Relative
 3. Activate Make Paths Relative from your Plugins page.
 4. Go to **“after activation”** below.

### Manually

 1. Upload the `make-paths-relative` folder to the `/wp-content/plugins/` directory
 2. Activate Make Paths Relative through the ‘Plugins’ menu in WordPress
 3. Go to **“after activation”** below.

### After activation

 1. Go to the plugin settings page and set up the plugin for your site.
 2. You’re done!

## Đánh giá

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

### 󠀁[Does the trick, many thanks!](https://wordpress.org/support/topic/des-the-trick-many-thanks/)󠁿

 [tudorilisoi](https://profiles.wordpress.org/tudorilisoi/) 31 Tháng 7, 2025

it makes local dev to deploy frictionless

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

### 󠀁[Breaks Database Connection](https://wordpress.org/support/topic/breaks-database-connection/)󠁿

 [KJ](https://profiles.wordpress.org/kennjordan/) 8 Tháng 7, 2022 1 trả lời

I have a clean WordPress install using the Twenty Twenty-Two Version: 1.2 theme.
The only plugin installed is yours, ‘Make Paths Relative’. In settings I checked
the box for ‘Image Paths’. Then changed the WordPress > Settings > General > Timezone
from ‘London’ to ‘Los Angeles’ Then BOOM! the following error appears: One or more
database tables are unavailable. The database may need to be repaired. Upon investigation
in myPHPAdmin we discovered that the _options table field ‘option_name’ > ‘siteurl’
and ‘home’ were blank where the websites url should be. Once, we manually put in
the URL into these fields, went back to the site, and refreshed; it worked again
until we changed the timezone back again. We also tested this on different web hosts,
servers, and with different themes and were able to reproduce the behaviour.

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

### 󠀁[Not working](https://wordpress.org/support/topic/not-working-3801/)󠁿

 [tsf999](https://profiles.wordpress.org/tsf999/) 23 Tháng 12, 2021 1 trả lời

Not working with WP 5.8, broke site completely while links are still absolute.

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

### 󠀁[Excellente.](https://wordpress.org/support/topic/excellente-25/)󠁿

 [Mauricio Lopez Coria](https://profiles.wordpress.org/damonh/) 22 Tháng 3, 2021

Lightweight, easy to use, and it works. One of my must-have plugins.

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

### 󠀁[simple, straightforward, works perfectly](https://wordpress.org/support/topic/simple-straightforward-works-perfectly/)󠁿

 [vor23](https://profiles.wordpress.org/vor23/) 22 Tháng 6, 2020

This is just the perfect plugin: I installed it, easily set it the way I want it,
then refreshed my site and immediately saw the results. If only all plugins were
this straightforward, quick, and effective!

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

### 󠀁[It caused trouble](https://wordpress.org/support/topic/it-caused-trouble/)󠁿

 [Fabrício](https://profiles.wordpress.org/fabricios/) 31 Tháng 10, 2019

I didn’t like the plugin. While enabled, it broke internal site links. Both http
and https gave “too many redirects” error. Also, the tools to share on Twitter, 
Facebook, etc. gave error because the URL appeared relative (without the site domain).
Just disable the plugin for both problems to end. I do not recommend.

 [ Đọc tất cả 16 đánh giá ](https://wordpress.org/support/plugin/make-paths-relative/reviews/)

## Người đóng góp & Lập trình viên

“Make Paths Relative” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

 *   [ Sami Ahmed Siddiqui ](https://profiles.wordpress.org/sasiddiqui/)

“Make Paths Relative” đã được dịch qua 5 ngôn ngữ. Cảm ơn [những người tham gia dịch](https://translate.wordpress.org/projects/wp-plugins/make-paths-relative/contributors)
vì đóng góp của họ.

[Dịch “Make Paths Relative” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/make-paths-relative)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/make-paths-relative/), check
out [SVN repository](https://plugins.svn.wordpress.org/make-paths-relative/), hoặc
theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/make-paths-relative/)
qua [RSS](https://plugins.trac.wordpress.org/log/make-paths-relative/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 2.1.0 – July 11, 2024

 * Bugs:
    - Fixed an issue where replacements using \n or $n weren’t working correctly.
 * Feature Additions:
    - You can now include slashes in hostnames, giving you more flexibility.
    - For improved security, plugin can no longer be used on the admin dashboard.
    - We’ve enhanced how relative escaped URLs are handled within the body content.
    - Add functionality to relative WordPress stylesheet directory URIs.

#### 2.0.0 – June 28, 2024

 * Security Enhancement:
    - Implemented a nonce mechanism to safeguard page updates, preventing unauthorized
      modifications.
 * Feature Additions:
    - Define multiple domains to be act as relative.
    - Enhanced content control by allowing removal of specific domains from the 
      entire HTML body tag.

#### Earlier versions

 * For the changelog of earlier versions, please refer to the separate changelog.
   txt file.

## Meta

 *  Phiên bản **2.1.0**
 *  Cập nhật lần cuối **10 tháng trước**
 *  Số lượt cài đặt **2.000+**
 *  Phiên bản WordPress ** 2.6 hoặc cao hơn **
 *  Đã kiểm tra lên đến **6.8.5**
 *  Phiên bản PHP ** 5.6 hoặc cao hơn **
 *  Ngôn ngữ
 * [English (Australia)](https://en-au.wordpress.org/plugins/make-paths-relative/),
   [English (Canada)](https://en-ca.wordpress.org/plugins/make-paths-relative/),
   [English (UK)](https://en-gb.wordpress.org/plugins/make-paths-relative/), [English (US)](https://wordpress.org/plugins/make-paths-relative/),
   [Spanish (Argentina)](https://es-ar.wordpress.org/plugins/make-paths-relative/),
   và [Spanish (Spain)](https://es.wordpress.org/plugins/make-paths-relative/).
 *  [Dịch sang ngôn ngữ của bạn](https://translate.wordpress.org/projects/wp-plugins/make-paths-relative)
 * Thẻ
 * [migration](https://vi.wordpress.org/plugins/tags/migration/)[relative links](https://vi.wordpress.org/plugins/tags/relative-links/)
   [seo friendly urls](https://vi.wordpress.org/plugins/tags/seo-friendly-urls/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/make-paths-relative/advanced/)

## Đánh giá

 4.1 trên 5 sao.

 *  [  11 5-star reviews     ](https://wordpress.org/support/plugin/make-paths-relative/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/make-paths-relative/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/make-paths-relative/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/make-paths-relative/reviews/?filter=2)
 *  [  3 1-star reviews     ](https://wordpress.org/support/plugin/make-paths-relative/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/make-paths-relative/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/make-paths-relative/reviews/)

## Những người đóng góp

 *   [ Sami Ahmed Siddiqui ](https://profiles.wordpress.org/sasiddiqui/)

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/make-paths-relative/)