DNS – Change WordPress Site Name?

You need to update all the places in the database that are using the original location. you can use the following tool to do so. There are others but I have found this one to be easy. Just remember to remove the files after you are done with it. I would run this in it’s … Read more

Protect get_query_var from manual input in url

When someone messes up an URL it’s typically not something to do anything about. If you look at any site’s log they receive tons of completely broken and malformed requests every day. You only have to care about one case — that URL parses properly and input data is valid and safe. Whenever request is … Read more

Dynamic URL and pass the data to an iframe

Step 1: Create a page with slug ‘profile’ in your WordPress Dashboard. Step 2 Use this function to register profileId var. add_filter(‘query_vars’, ‘wp233_query_vars’); function wp233_query_vars( $query_vars ){ $query_vars[] = ‘profileId’; return $query_vars; } And add a rewrite rule to wordpress like this: add_action( ‘init’, ‘wp233_add_rewrite_rules’ ); function wp233_add_rewrite_rules() { add_rewrite_rule( ‘^profile/([^/]+)?$’, ‘index.php?pagename=profile&profileId=$matches[1]’, ‘top’); } Step … Read more

Using a .pdf file as a page in wordpress

just upload it through ftp or your domain hosting panel to your public_html (www) directory. It will be there as a link to www.example.com/myfile.pdf. The case may be that if you have wordpress and installed any security plugins you’ll have to allow the exception within that plugin as well.

Need to change link URL embedded in multiple posts to new link URL

Honestly, the best way to do this is to run some queries on the database using regex to search and replace, after the database has been backed up of course. Before learning more about SQL, I used this: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/, which should work for you in this situation. You download the file, upload it to your … Read more