Want to host your WordPress site from a different domain? This plugin will help! |
Noted That:
|
Start the Tips:1. First Download "absolute-relative-urls.zip" Plugin to your Local Computer. (Click Download) 2. Then, Login to your "yourdomain.com/wp-admin" Dashboard. 3. Then, Click on "Plugins" + "Add New" from left sidemenu of Dashboard. 4. Now, Click on "Upload Plugin" button.
5. Now, Browse "absolute-relative-urls.zip" Downloaded plugin from your computer, Where you downloaded absolute-relative-urls.zip According to Step – 1 Above then, click on "Install Now" 6. Now, Click on "Active Plugin" 7. Then, See left sidemenu. "Absolute Relative URLs" folder is added on left sidemenu. Now, Click on "Absolute Relative URLs" folder. Noted that: If you do not see "Absolute Relative URLs" folder on left sidemenu then, see at left sidemenu "Settings" or "Tools". 8. Now you configure yourself oR Watch video tutorial below about Absolute Relative URLs Configurtions and Settings or How to work "Absolute Relative URLs" in your WordPress site. oR After Activated Plugin According to Step-6 then,
![]() |
Guide |
---|
That’s it! Check your database after you’ve saved some content. URLs should be root relative. Check your editor. URLs should be absolute. Check the source on your web page. URLs should be absolute. The plugin does not retroactively modify urls in your database unless you manually update content. However, it can convert urls as needed. See notes about related sites. Should you stop using the plugin your website will still work as the plugin uses root relative urls and browsers assume the same domain when they see a relative url. Exceptions would be when a you are running in a subdirectory and that is part of your site url, if you are providing an RSS feed to third parties where absolute urls are required, or if you use the multi-site conversion.
With the introduction of the WordPress block editor, urls were not being converted to absolute urls when editing content. They were converted properly when viewing content on the front end, and that is where it is important. But for consistency, and to meet the intent of the plugin, you now see absolute urls in the block editor. This is enabled by default. You can disable it with the following code in your functions.php:
A new feature in this version is the ability to remove and restore the ‘sites/’ part of the upload path when running in a multi-site environment. Unlike url conversions, where most websites will continue to display appropriately when you deactivate this plugin, this feature requires this plugin to be active in order to restore the sites part of the upload path. On the other hand, you should be able to move a stand alone site into a multi-site environment and let this plugin insert the sites part of the upload path without having to convert your database. To enable this feature, add the following filter to your functions.php:
Tested plugin in a multi-site environment and confirmed that conversion of urls, except for the sites part of the upload path, work as expected. In a multi-domain environment, the domain is removed and restored. In a multi-folder environment, the domain and folder are removed and restored. This is the same as running stand-alone with a domain only, or in a folder within a domain. Another feature introduced in this version is the ability to disable the conversion to absolute or relative urls. There are other wordpress plugins that convert to relative urls, but don’t offer the complement. Disable the conversion to absolute urls and you have the same functionality. Or should you want to revert back to having absolute urls stored in the database, disable relative urls, then edit and save content to restore the full urls to your database. To disable one or the other, add one of the following to your functions.php:
What may be the most poweful new feature is the ability to display your site under your current domain, even when it was created under a different domain, without doing any conversion. That’s right. We’ve enhanced the related sites feature to do real time conversion from existing content, not just new content. You can now migate one domain to another, add a related site for the former domain, and enable related sites for existing content. To do this last bit, add the following to your functions.php:
When you set up related sites, and the site url and wordpress url are the same, you can now specify either one. For example, either of the following will work:
One more thing. We now parse ‘data-link’ urls along with others such as ‘href’ and ‘src’. We discovered these being used in the gallery component of the block editor.
Allow urls from related sites to be saved as relative urls. This makes it easier to copy/paste html content from one site to another (e.g. staging to production, production to development). Note that this doesn’t solve all problems with copy/paste from one site to another. For example, if images on one site are in a different folder, they will still need to be tweaked manually. To add related sites, add a filter and function to your functions.php similar to the following:
Note: if site url and wp url are identical, you only need to specify ‘wpurl’.
Enable all options instead of specific options. In functions.php, put:
Manage filters that get processed by modifying the array of filters. Build a function to add or remove filter names in the array. Then in functions.php, put:
where {type} is ‘view’, ‘save’, ‘option’ or ‘exclude_option’. |
domain, plugin, help, different, site, host, your, wordpress, want, |
Name |
---|
Reffered: https://wordpress.org/