URLs fine in database but wrong in output

Ok, this was pretty strange. While only http// showed up in the URLs the database fields for the corrupted URLs were http://http// which obviously resulted in the error. I did another search & replace for those “double http” and that fixed it in the end. Still no idea why this only happened to some URLs … Read more

How do I point two urls to the same child site in a multisite config

Don’t add more sites to point more domains to the same site. Just add more domains to the same site from this address /wp-admin/tools.php?page=domainmapping of the dashboard of the site. You might need to disable primary domain check from this network admin page /wp-admin/network/settings.php?page=dm_admin_page if you don’t want the domains to all redirect to the … Read more

WordPress switch domains

First of all, go to phpMyAdmin, go to your database for test.site.com and edit siteurl and/or home in wp_options table. That’ll fix your test.site.com Now, to migrate test.site.com to site.com, as you’ve difficulties doing it manually, I’d suggest a plugin like Duplicator or All-in-One WP Migration to migrate the site. It’s way easier that way. … Read more

Rewrite URL to get rid of wp-content etc and change URL

$matches[1] doesn’t work for external redirects, only internal (URL must start with index.php and handled by WordPress itself) Try this add_action(‘init’, ‘custom_rewrite_pdfURL’); function custom_rewrite_pdfURL() { add_rewrite_rule(‘^carPDF/([^/]*)/?’, ‘wp-content/themes/exampletheme/templates/pdf-generator.php?productID=$1’, ‘top’); } Don’t forget to flush permalinks

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)