Yourls Not Working

I know, kind of a weird way to start off by saying something doesn’t work.

Yourls works great for shortening your urls and tracking your clicks and providing details about those clicks.

For some servers, there seems to be a problem when you try to add a url – Yours can’t add urls 🙁

You seem to get the “spinning wheel” that never stops and tells you that the url has been added.

The installation is straightforward (if you understand installing scripts, setting up MySQL datatbases, chmod directories … you know, that kind of stuff).

There Is A Problem

On some servers, certainly not all, Yourls doesn’t seem to work.  It won’t allow you to add a url – sure, it looks like it is working, but it never completes and tells you that the url has been added.

So what’s a person to do?

If you don’t mind hacking around a little bit, then open up your favorite file editor or login to your websites control panel and find the insert.js file that was installed in your Yourl’s js/insert.js file and add a couple of lines of code.

One line 39 add the following code:  newurl = newurl.replace(“http://”, “”);

It should look like this:

You need to do the same thing later in the js (javascript) file, on line 111 add the exact same line of code.

Your Yourls url shortener should now be able to add and delete urls.

I don’t know if you noticed or not …

These “hacks” unfortunately don’t allow you to do one thing that Yourls was designed to do.

And that is, track secure urls, https.

That’s the price you will have to pay with this hack if you are having problems adding urls to yourls.  If you are not using secure urls, then no big deal.

If you are interested in an easier solution, let me know

I was considered knocking out a script that autoinstalls Yourls, however I would like to know if there is even a hint of interest before I go down the rabbit hole.

Use the comment section below to let me know if you are interested.

{ 1 comment }

Lorin Roberts

Hi Dave! Sure I would be interested… 🙂

Comments on this entry are closed.

Previous post:

Next post: | 522: Connection timed out

Error 522 Ray ID: 4dc5cbfdfcf1cf54 • 2019-05-25 07:29:42 UTC

Connection timed out








What happened?

The initial connection between Cloudflare's network and the origin web server timed out. As a result, the web page can not be displayed.

What can I do?

If you're a visitor of this website:

Please try again in a few minutes.

If you're the owner of this website:

Contact your hosting provider letting them know your web server is not completing requests. An Error 522 means that the request was able to connect to your web server, but that the request didn't finish. The most likely cause is that something on your server is hogging resources. Additional troubleshooting information here.