The right way to Create URL Shortener with Your Area

by | Mar 26, 2023 | Etcetera | 0 comments

We see shortened URLs and even use URL shortening services and products like or all the time. The ones services and products and merchandise are great, then again have you ever ever regarded as rising something similar to your own?

Putting in this sort of supplier on your own is slightly easy, and in this post, I’m going to show you how to simply do this.

Enter YOURLS, a.good enough.a Your Own URL Shortener.

This unfastened PHP script allows you to create your own custom designed space URL shortener similar to TinyURL and

We’ve installed and carried out spherical with it for a while, and proper right here’s why we think it’s great:

  • Easy to place in – For those who’ve got no problem putting in WordPress, then atmosphere YOURLS is a piece of cake.
  • Customizable links – You’ll customize the links (Example: as an alternative of the random characters ( that make no sense.
  • Statistics – An admin internet web page that permits you to arrange and keep apply of details like date of creation, IP, clicks, and lots of others.
  • Public/Private links– You keep an eye on whether or not or no longer this supplier is available for most of the people to use or yourself best.
  • Bookmarklet – Easy bookmarklet to create your own temporary URL on the fly.

YOURLS moreover comes with developer API along with WordPress plugin. For those who like the idea of proudly proudly owning a private URL-shortening supplier, please be told on.

See also  The best way to Write a Listicle [+ Examples and Ideas]

Without further ado, proper right here’s a simple data on how to setup YOURLS.

Getting started

Proper right here are some things you’ll need previous than the arrange:

1. Space name

A actually temporary one may well be easiest, then again it’s laborious to get nowadays. When you’re making an allowance for of getting a actually temporary space name, we recommend you check out your luck on nation code top-level domain names like .at, .lv, .ly, and lots of others.

2. PHP-supported web internet internet hosting account

YOURLS runs on PHP, so you will need to make certain that the server (trustworthy or shared internet internet hosting) is helping PHP 7.4 and MYSQL 5 and above with mod_rewrite enabled.

Learn extra about YOURLS prerequisites.

Rising your own custom designed URL shortening supplier

With all the above-mentioned prerequisites in a position, let’s make our private URL shortening supplier with YOURLS.

  1. Get a replica of the most recent model of YOURLS. Unzip it and fire up your favorite text editor as we’re about to do some configurations.
  2. Seek for accommodates/config-sample.php, rename it to accommodates/config.php and open it along side your favourite code editor.
  3. Vital settings you’ll want to alternate are: YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_SITE. Final then again no longer least, alternate your password for username and username2. The rest of the settings are optional. We advise you go through all of the issue; it’s pretty self-explanatory. Be informed YOURLS configuration information for those who’re no longer positive of the best way/what to switch.
  4. Create a database with the name you’ve inserted for YOURLS_DB_NAME. If your web internet internet hosting account gives you cPanel, login and to seek out “MySQL Database” underneath Databases column.
  5. create databasecreate database
  6. Upload all data and folders within the an identical development to the root folder of your web internet internet hosting account. Your root folder name would most likely varies from public_html, www, html, and lots of others.
  7. upload to serverupload to server
  8. Open a brower window, type in your space name as url, apply by way of “/admin/arrange.php” (without the quotes). Example:
  9. If the whole lot is able up correctly, you’ll see the following messages with the link in your admin internet web page at the end of the street.
  10. YOURLS install successYOURLS install success
  11. Login and get began rising your very private temporary URL. Be sure to check out the“Equipment” link if you wish to make a bookmarklet. Proper right here’s a trend of the best way our YOURLS admin internet web page turns out like.
  12. YOURLS sampleYOURLS sample

The post The right way to Create URL Shortener with Your Area gave the impression first on Hongkiat.

See also  Repair Publish-Processing of Symbol Failed Error in WordPress

WordPress Website Development


[ continue ]

WordPress Maintenance Plans | WordPress Hosting

read more


Submit a Comment

Your email address will not be published. Required fields are marked *