Ok so i have this custom blog that i now need to move over to wordpress. I tried using the import features in wordpress but that didnt work as planned. The custom blog is written in php and has a userscomments table, authors table, and posts table. Is there an easy way to move all these posts over to wordpress and preserve all the comments per post.
If the custom blog doesn't have an export function that will dump its data into a format WordPress can read, then it may be that you'll have to roll your own. There are 2 approaches:
Do a database-only import, using code or SQL tools along with information from the WordPress Codex entry on the WP database. This will probably be fairly simple from a coding standpoint, but you have to make sure you get it right.
Use the WordPress API to create the posts based on the output from the old system. This will involve a bit more learning, but it's the Right Way™ to do it, and means that you learn the WordPress API rather than the database structure.
If I were doing it myself, I'd choose option #2.
Related
I have to migrate the posts of a very old custom legacy blog made in ASP (the posts are stored in a MySql table) into a new WordPress blog.
So I need your help to find the smartest solution to do it, I rule out the idea of doing it manually because the number of posts that should be migrated is really high.
So looking this ER schema: http://codex.wordpress.org/images/9/97/WP3.8-ERD.png
I thought I could create a script that take a post from the post table of my old legacy blog and create a new record on the wp_posts wordpress post table of the new blog.
Is it a good solution or exist something better? A WP plugin on something like this?
Tnx
It is better to take advantage of the WordPress Codex rather than importing directly into the tables. This will ensure that the IDs/relationships are generated correctly and that data is serialized as needed to the various tables. If you don't want to write custom code, the easiest way to do this would be to use a CSV import plugin - there are several in the WordPress Plugin Repository - but no particular recommendations.
I am a long time Wordpress user looking to use the tool as a CMS to generate a website which will have individual posts about hundreds of specs on products that I have stored in a backend MySQL table. Is there a plugin or a tool that will help me auto generate these posts? For each post, I would like it to have the same format of title (one column) so that the URL will look like: http://www.domain.com/product1specs etc. Each post will contain a description (another column) and show a graph (data stored in another column).
Or do I even need to create posts? Is there a way to do this dynamically? So if someone goes to www.domain.com/product1 than it will automatically look in the database to find out what it should display for product1?
I believe there are other ways to do this with an PHP framework such as Code Igniter but I would like to stick with Wordpress because I am familiar with it and have other Wordpress plugins/themes I would like to leverage.
Any tips would be greatly appreciated!
I don't know of a plugin but take a look at this answer which basically required the same thing:
How to migrate from Yii to Woocommerce Wp, Still keep to old database (table,rows)
Is it possible to echo a value from the active post in wordpress?
Example: If I make a row called: post_numberofreads and I want to echo this value for each post, by inserting a line of code in the single post template page (single.php) that calls any given posts 'post_numberofreads'. How would I go about doing this?
Please notice that this is an example. The important part is that I want to echo something from the active row - not just get the number of reads.
Thanks for your time.
While the ideal solution is to create a wordpress plugin with your custom functionalities but it require good understanding of wordpress and plugin development.
The other solution more can be to inject your custom code in the wordpress core manually. I is comparatbiliy easy and often unsecure and get broke frequently.
For second option you can:
A) Create required custom columns in wp-posts in wordpress database using phpmyadmin or your favourite tool.
B) Inject your code into the relevant files. Generally these files are:
wp-content/themes/your_theme/single.php #For blog post
wp-content/themes/your_theme/page.php #For pages
C) Then you can using built in wordpress functions like get_the_ID to get current post ID. You can also other wordpress functions to communicate with wordpress database or write your own functions.
I have one project of blog site to be developed in wordpress. I have no experience how wordpress works, I read Codex documentation, But didn't find the answer of my questions,
So Project Requirements are ,
1: Post Movie with Thumbnails,Links to Download or Streaming Websites,Genre(Taxonomy),Youtube Movie Trail,
2: User can Like,rate,comment,Add to watch list,Share with friends
3: I have database of more than 3000 Records, I don't want to insert it to the wp_posts Table for some reasons.
4: How to add javascript to Widgets,or Plugin (Maybe it's a stupid Question)
My problem is I don't know what is the write way to do it. There are Two Major things in WP
1: Plugin
2: Widgets
How can i use them in my project ? From Where Should I start First, I have done with the theme Development, And Some Basic Concepts of wordpress Like, Action,Filters. I can create this project easily with the PHP and JS . Don't suggest me any premade wordpress plugin or Widgets, I want to code it myself
What do you mean add javascript to widgets or plugins? You can include javascript by adding it to the Theme of the page.
Most of your development should be on a Theme. A Theme is essentially a collection of different page templates, styling and functions that will be used. Theme can also handle taxonomy and meta data.
Since you have a DB already what you could do is make a page template called "movie" that pulls an ID/Slug and retrieves it from the database to get the relevant information.
Helpful Links:
Taxonomy - http://codex.wordpress.org/Taxonomies
Queuing Scripts - http://codex.wordpress.org/Function_Reference/wp_enqueue_script
WPDB (Database Class) - http://codex.wordpress.org/Class_Reference/wpdb
I think there might be already some themes ready with the functionalities you want. Did you do a search for stock themes? I've come across a few for video/movies displaying with ratings, social sharing, etc. So your development work would reduce significantly.
I have a small project for which I need to offer a CMS UI/storage system.
I am guessing that I can have my computer-fearing client use the Wordpress UI to store a set of images for her gallery page, and a set of text for her testimonials page. And then, through a Wordpress function, or raw SQL query into the database, I can get the data that I need on the page.
If this is possible, how do I do this?
We use the Pods CMS Wordpress plugin to help us create custom data fields for our site, for areas where the typical post/page structure just isn't appropriate.
Like everything else in Wordpress, Pods is a little rough around the edges, but it does provide a fairly simplistic interface for pulling information out of a database, without the need for raw SQL, or bolting together custom fields for a post.
A simple example for looping over records might look like:
$mypod = new Pod('mypod');
$mypod->findRecords('date ASC', 15) // ORDER BY date ASC, LIMIT 15
while ($mypod->fetchRecord()) {
$image = $mypod->get_field('image')
...
}
It also supports a basic set of relationships between Pod objects.
You can either just create your own theme/template for Wordpress, or you can create your own frontend altogether with raw SQL queries. The database layout is rather simple so it shouldn't be impossible to create your own system.
But consider the theme solution first because I think it's both easier for you (not needing to reinvent the wheel) and better for security (easy to use the built-in functionality for security updates).
So, WordPress 3.0 is getting to the point where it is no longer just a blogging platform, but almost a fullblown CMS. For her testimonial pages, or about me, contact, etc, you can use WordPress. Instead of creating new entries, just have her (or you) create pages.
For the gallery, there is an open source project called Gallery that you can use that would allow the client to upload and manage their own photos. In WordPress, just create a new menu item and link to the Gallery installation you have.