If you try and shorten a URL directly by using the YOURLS api url, what happens? e.g. by visiting http://yourinstall.com/?signature=api_signature&url=http://www.yourdomain.com&action=shorturl
Thread Starter
gatta2
(@gatta2)
It’s a blank page.
Actually the YOURS is a local install but when I configure it as local in WP to Twitter setting page, it said “Incorrect DB config, or could not connect to DB”
I’m sure the MySQL setting is correct in the YOURLS config.php file.
Blank page is fine; did the URL get shortened? Is it visible in your admin for YOURLS?
Generally, it’s better to use the remote connection for YOURLS. The only reason the local setup still exists is for backwards compatibility; it was important before YOURLS improved their remote API to use a signature instead of passing username and password in the URL.
Thread Starter
gatta2
(@gatta2)
Thread Starter
gatta2
(@gatta2)
FYI url shortening works properly if I publish a new post instead of updating an old post.
OK, I see – URLs aren’t shortened when a post is updated; instead, the old URL is pulled from post meta. Are you getting the full URL instead of the short URL?