Title: WP-Portability
Author: plankdesign
Published: <strong>7 сар 22, 2014</strong>
Last modified: 10 сар 26, 2015

---

Search plugins

![](https://ps.w.org/wp-portability/assets/banner-772x250.png?rev=953050)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/wp-portability/assets/icon.svg?rev=984371)

# WP-Portability

 By [plankdesign](https://profiles.wordpress.org/plankdesign/)

[Download](https://downloads.wordpress.org/plugin/wp-portability.zip)

 * [Details](https://mn.wordpress.org/plugins/wp-portability/#description)
 * [Reviews](https://mn.wordpress.org/plugins/wp-portability/#reviews)
 *  [Installation](https://mn.wordpress.org/plugins/wp-portability/#installation)
 * [Development](https://mn.wordpress.org/plugins/wp-portability/#developers)

 [Support](https://wordpress.org/support/plugin/wp-portability/)

## Description

#### Summary

WP-Portability is a plugin designed to quietly make your site more portable. It 
is to designed to facilitate the work that needs to be done to be move a wordpress
install to another directory or server or domain name. It makes WordPress much less
attached and dependant on its install directory and domain name.

Though anyone can make use of WP-Portability, it was designed with developers in
mind. It greatly facilitates designing sites locally amongst a team of developers,
moving the site to a staging server and finally pushing it live.

#### Features

WP-Portability provides the following optimizations:

 * **Always local URLs**: Perhaps the biggest issues with relocating a wordpress
   install is the fact that every url pointing to other content in the same site(
   links to other pages, uploaded media, etc.) in the content of posts will break.
   This can be a nightmare to fix for larger sites. WP-Portability solves this by
   storing all local urls as a hidden shortcode in the database, which it can then
   expand to the correct path for whatever domain/install directory you view the
   site from. You will not see anything differently when you edit your posts, but
   rest assured that things are being handled dynamically in the background.
 * **Dynamic file paths**: This plugin will automatically determine the url of your
   WordPress install path. This will set the `WP_SITEURL` and `WP_HOME` constants.
   If these are already set in wp-config, this feature will not work. This feature
   will automatically disable itself on WordPress Multisite installations (network),
   as it will not work properly.
 * **Relative Rewrites**: This plugin changes the way WordPress creates apache-level
   rewrites, to always use relative paths, rather than absolute paths. This will
   enable access to the same installation via different routes (e.g. `http://domain.
   com` and `http://127.0.0.1/path/to/install`). This feature will automatically
   disable itself on WordPress Multisite installations (network), as it will not
   work properly.

### Upgrade

#### 1.0.1

 * Fixed bug in WordPress 4.0

## Installation

#### Installation

 1. Make sure you are using WordPress 3.1 or later and that your server is running 
    PHP5
 2. Download the plugin
 3. Extract all the files.
 4. Upload everything to the `/wp-content/plugins/` directory.
 5. Activate the plugin through the ‘Plugins’ menu in the WordPress admin.
 6. Go to the portability settings page in the WordPress admin and adjust your settings.
 7. (optional) You can force the plugin to parse every post in your site for local 
    links by pressing the Insert Shortcode button. This may take a few minutes.
 8. That’s it. WP-Portability works silently.

#### Deactivation / Uninstallation

Unless you intend to reactivate the plugin shortly, you will need to clear all of
the hidden shortcodes out of your database.

 1. Go to the portability settings page in the WordPress Admin
 2. Press the ‘Purge Shortcode’ button. This may take a few minutes.
 3. Go to the Plugins page.
 4. Press the deactivate and/or delete plugin button.

## FAQ

  Can I use that mysterious shortcode myself?

Yes! The shortcode introduced by this plugin can absolutely be used to help you 
write out local links. The only caveat is that it will automatically be rendered
back to you whenever you save the post (save draft, publish or update). The syntax
is the following:

    ```
    [url {location}]
    ```

Where `{location}` is a part of the site to link to. Possible values include:

 * site : Will generate a url for the root installation directory
 * uploads: Will generate a url for the media upload directory
 * plugins: Will generate a url for the plugins directory
 * theme: Will generate a url for the main theme directory
 * stylesheet: Will generate a url for the child theme directory (if any). Otherwise,
   this is identical to theme.

You can then append your more specific path to the shortcode. For example:

    ```
    <img src="[url uploads]/2014/07/picture.jpg" alt="A vacation picture">

    <!-- Will evaluate to this: -->
    <img src="http://domain.com/wp-content/uploads/2014/07/picture.jpg" alt="A vacation picture">
    ```

  Why don’t all features work with a WordPress MultiSite install?

WordPress Multisite (network) installs greatly change the way wordpress structures
itself. As such, the fixes that this plugin introduces may conflict with this configuration.
Until further testing and development can be done, we have disabled the problematic
features automatically for the time being. This may be fixed in a future release.

  I deactivated/uninstalled the plugin and now my links don’t work and/or I see [
url site] littered throughout my post. How do I fix this?

If you intend to get rid of this plugin entirely (we are sorry to see you go!), 
then you should let the plugin purge its shortcodes from your database first. Before
you deactivate or uninstall the plugin, Go to the portability settings page in the
WordPress admin and press the Purge Shortcode button. This will safely convert all
local link shortcodes in your database back to absolute links.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“WP-Portability” is open source software. The following people have contributed 
to this plugin.

Contributors

 *   [ plankdesign ](https://profiles.wordpress.org/plankdesign/)
 *   [ frasmage ](https://profiles.wordpress.org/frasmage/)

[Translate “WP-Portability” into your language.](https://translate.wordpress.org/projects/wp-plugins/wp-portability)

### Interested in development?

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

## Meta

 *  Version **1.1.1**
 *  Last updated **10 жил ago**
 *  Active installations **10+**
 *  WordPress version ** 3.1 or higher **
 *  Tested up to **4.0.38**
 *  Language
 * [English (US)](https://wordpress.org/plugins/wp-portability/)
 * Tags
 * [installation](https://mn.wordpress.org/plugins/tags/installation/)[shortcode](https://mn.wordpress.org/plugins/tags/shortcode/)
   [url](https://mn.wordpress.org/plugins/tags/url/)
 *  [Advanced View](https://mn.wordpress.org/plugins/wp-portability/advanced/)

## Ratings

 3 out of 5 stars.

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

[Add my review](https://wordpress.org/support/plugin/wp-portability/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-portability/reviews/)

## Contributors

 *   [ plankdesign ](https://profiles.wordpress.org/plankdesign/)
 *   [ frasmage ](https://profiles.wordpress.org/frasmage/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wp-portability/)