Change wordpress post content url from mysql? - wordpress

Where do I go in the Mysql database to change the path of the media that are already inside the post instead of having to each post one by one and change the links url.

This is a great plugin, I use it all the time
http://wordpress.org/extend/plugins/search-and-replace/
you just tell it what you want to change and it will go through your whole db find/replace. totally recommended.

Related

How to remove a WordPress page from a path?

I have a site that was made in WordPress and I need to remake it just with HTML and php.
The problem is
I have a page at the url www.mydomain.com/create
I created a new file with same name, www.mydomain.com/create.php
Now on the host I removed the extension .php, but the problem is i will still hit the word press page.
Where can I find the file with the url set for this page? I don't know much about word press besides where plugins are.
WordPress does not use one file per page / post. WordPress instead has a template system inside themes that defines how pages and lists of posts are turned into HTML. The content of those pages and posts resides within the database and can be viewed in wp-admin. Further, WordPress extensions and themes can define hook functions and filters to modify content and style of the page and execute code upon certain events.
You cannot find a file for this "/create/" page. It has some content in the database but the content itself won't render into what you see in the browser.
Sorry to say this, but if you like to recreate the site, you will have to find a new way of constructing and rendering it (and also reusing code). You might also want to look for a proper framework like Laravel and have some proper routing in place (instead of renaming PHP files).
Edit:
You can change the permalink for create like so:
UPDATE PREFIX_posts SET post_name = 'create_old' WHERE post_name = 'create';
You have to adapt the MySQL table name to the WP posts table by replacing PREFIX with whatever prefix your WP posts table has.

How to define images for template on every page?

i built up a wordpress theme and inserted an imageslider to this. The Images are still static but i would like to define them on every wordpress-page. I may could filter the page ID in the template-header and define the images dynamically.
Now im searching for a method to dynamically define them in the pageeditor in the backend of wordpress. So that the customer can change them himself for every page.
Is there already a plugin for this problem or any other easy solutions?
thanks and greatings
stetro
There is some great slider plugins already out there. WooThemes's one being one of my favourite. It is $35 though.
If you've already got it all setup though, and just need to be able to do it dynamically, then you could use a plugin like Attachments. You can just have it call the attachments for the current page/post, and use those images. If you NEED to have a slider on every page, then check for attachments on the current page/post, and if there is none, then request the ones for the home page. Done and done. Well I hope so, not sure if I read your question correctly... Hope this helps but :)

Format wordpress posts to use post title in URL instead of numeric autoincrement?

All my blog post URLs currently look like this: http://www.HeyItsMyBlog.com/?p=368
I want to change the URLs so instead they look like http://www.HeyItsMyBlog.com/2010/11/new-kittens-omg/
This is an easy change in the WordPress admin panel, but there are a bunch of people who have linked to my currently-formatted URLs around the web. How can I make the transition and ensure that it won't break the old links?
The latest version of Wordpress automagically interprets URLs of the form ?p=777 by redirecting the user to the corresponding pretty URL. You don't need to do anything special beyond enabling pretty URLs in the admin panel.
It works either way (when you set the permalink to your desired one). Test it of course. And oh, this question belongs to http://wordpress.stackexchange.com

How do I load only a single wordpress post via the url?

We are currently undergoing some reworking of our website - in the meantime, I am looking for a quick a dirty fix.
We have wordpress setup, so that no-so-tech-savvy employees can add events, news, etc. However, there are currently sections on our site dedicated to what would be tags in Wordpress.
For instance, we have posts in WP with the tag "events." It's easy enough to display all posts with that tag, but I need to do a PHP include on our old site, and only show JUST THE POST. I can use a rss2html tool, but it strips out somethings like necessary tables.
So how do Display only a single WP post, without anything else (no menus, settings, no Wp interface) via a URL? I could use a theme that is stripped down (by using something like theme switcher), but I need it to only load that theme once, not be the default theme....
http://codex.wordpress.org/Theme_Development#Query-based_Templates
http://codex.wordpress.org/Template_Hierarchy#Single_Post_display
quick and dirty way: select post_content from wp_posts where ID= [yourpostid]
and if you need some special queries e.g. meta data: just check the database diagram: http://codex.wordpress.org/File:WP_27_dbsERD.png

Drupal relative link problems moving from mydomain.com/test to mydomain.com

I currentley have a test site up and running on mydomain.cm/test. I am using the WYSIWYG module with tinymce to allow my customers to upload pictures to the site. One a image is added to the site tinymce/imce does not use the base url defined for the site in front opf links but gives linkes realtive to the root i.e. a picture of img.jpg will be linked in the code as /test/img.jpg. When the site goes live and we lose the /test the img will no longer be found there.
What would be the best way to bulk upload all the links before going live to remove /test in front of the links?
In the future when settting up a test site I will user a subdmain instead so I will not have this issue.
Any help would be apreciated.
The easiest way is to run a MySQL query directly on your database. Just search and replace in your node_revisions table in both the body and teasers column.
update node_revisions set body = replace(body,'/test/','/');
update node_revisions set teaser = replace(teaser,'/test/','/');
Of course, backup before you do this.
One solution is to leave all your content untouched and rewrite all the /test/*.[jpg,gif,png] urls through a rewrite rule in .htaccess.

Resources