I'm moving a site over that is currently setup in wordpress. I've not got a great knowledge on how WP works but the database all makes sense to me. I've built a custom blogging engine for the new site but I need to transfer all the old posts into the new site.
Before I go writing a script to loop through each posts then grab the image url etc and then match that up to the columns in my own database is there anything that exists already? I can't imagine I'm the first to do this!
Also - am I right in thinking that the image(s) for the post are _wp_attached_file with the corresponding post_id in the wp_postmeta table?
I've tagged this with php for Wordpress but happy for scripts in Python or RoR too if they exist.
Thanks
Is the standard wordpress export not detailed enough? I find this a very handy tool: http://en.support.wordpress.com/export
There is a plugin that imports your posts into a CSV file. It would be simpler to write a parser for that, I think - instead of writing a script to query the WP DB
Related
I have been trying to import or migrate the Codeigniter database into wordpress. Is that possible to do by any means? I have searched for the solution for it at many places but was unable to find a relevant solution to it.
The real problem is that I have already got a website created in CodeIgniter but now I am making a new site for the same using Wordpress. I need to import all the data and posts contained in the older site into the new one. Maybe database migration can be a easier idea. How will be doing so??
Codeigniter is a development framework for building applications. WordPress is a system that's already built. I think you could build a large application like WordPress with Codeigniter. But it would then rely on Codeigniter's libraries and framework, so to make that happen I think you would have to rebuild WordPress from scratch. Unless Codeigniter can be used as more of a PHP editing framework as well?
Maybe a Codeigniter guru will weigh in.
Source https://wordpress.org/support/topic/codeigniter-wordpress
The main issue with this is that your CI database is not structured the same as wordpress database.
There are some tools that help you import databases in wordpress like this plugins:
WP Ultimate CSV Importer Plugin
Really Simple CSV Importer
CSV Importer
but you will have to provide them the CSV file, that you'll have to export from your CI website. I don't think the import process is very complicated but it's sure easier if you spend some time understanding wordpress databse structure, for that a great resource is the wordpress code and the Database Description page.
The complexity of the CSV file is determined by the objects that you have to import in WordPress here is a check list that its good to have when you start building a CSV file:
1) Are you importing custom post types or just blog entires?
2) Do you have extra info on your import objects that have to be imported as custom fields?
3) Do you have users that you need to import? if you do, what roles do you need to have? do you require custom roles (this makes things very complicated)
4) Do you objects have images attached to them? if they do you'll have to make sure that the import plugin is able to import images!
5) Do you have categories and tags? do they have extra info besides wordpress default info?
When I have to import data to WordPress I try to keep it as simple as possible, I'm trying to import only blog posts and their images if possible depending on the complexity of the initial website I might import categories and tags too but I might split the process before adding this and process them after I have the posts in my wordpress site (this is because I'm more comfortable working with wordpress database and functions then with 3rd party CSV generated files - it might not be your case since you have full access to the initial CI website)
In the end have a look at the plugins I've linked or search yourself some import plugins and check the CSV files they need and try to make the CI website generate a CSV file that is similar with the ones in the examples.
If you have experience with the WordPress databse structure then you can also create a script that loads your data from one database to the other one (I recommend this approach for developers that have experience with both the old websites and WordPress at code/database structure level.
if you can share your databse scheme some extra info might be given.
Export posts from CI database in CSV/XML format or SQL and then change it to CSV accordingly. after that, use WP all import plugin and select the columns correctly. Easy as that..
I have a website running with Joomla!, and I'm using PhocaGallery, which is a component used for managing a photo gallery.
In my articles, I simply put a tag, for example :
{phocagallery view=category|categoryid=2|limitcount=2}
This tag displays simply 2 images from the category which has 2 as ID.
I'm developing my own application for this website, and when I load an article on it, I have simply the tag displayed, without images, that's normal.
I have the long PHP code for this plugin.
I would like to know how :
1. Detect the tag when the article is loadind in application
2. Call PHP script in the application to browse good images
3. Display images
The problem I think, is that the PHP code may call to folders on the website, and I think the application can't...
Do you think it's possible ?
detect the tag: use a regular expression to parse the parameters you need
inkoking the plugin is pretty straightforward, just make sure you're making all the necessary resources available i.e. most likely you will want to load the whole joomla framework. Since you're just querying a single table you might be better off doing it on your own with mysql, it will save you a lot of time both developing and at runtime
just output the
I just created a BLOG Script. I'm using foreach to loop and display the posts. But now I want to create a template engine like Wordpress. How can I do that? I'm new to PHP. I don't have any idea to do this.
I tried using file_get_content. For example:
file_get_contents("template_dir/template_name/index.php");
But there is a problem with CSS and images. That's my first problem. Anyone please help me to create this.
To bring in files you use include() or require()
However, I don't see why so many people insist on trying to reinvent the wheel. If you are building a blog install Wordpress and code your own Wordpress theme. Wordpress has been in development for years and is now not only one of the best blogging engines, but a very powerful cms capable of powering any type of site.
I'm developing an image gallery for one of my customers, they want a very minimal, simple and easy user experience. The image gallery must contain a title and description of each image, we have created a app to upload the images and set titles and descriptions this is stored in a mySQL database. We're developing this site with php.
Before I go off and develop this, does anyone know of any opensource galleries that tie into a mySQL database with similar functionality? Or maybe this approach is naive? Maybe I should approach this from a different direction and not use a mySQL backend..
Any advice is very welcome.
Josh
This one looks decent: http://gallery.menalto.com/. It supports MySQL and a bunch of other DBs.
For something this simple, you could get by without a database (however I doubt you would be able to have a title and description for the images without using a flat-file database; not recommended). To do it without a database, try this: http://spgm.sourceforge.net/.
However, if you already have written the uploader which works with MySQL, I would go with the database option and tweak it if necessary to work with the first link I posted.
I'm trying to write a script that will show the rss version of a single url (title, author, image, source, etc..). This should behave much the way that facebook does when you copy paste a link to share and it generates this information automatically. I'm trying to do this with a php script but would also be open to opensource programs that can do this as well.
also, if anyone knows of any Joomla/Drupal plugins that can do this that would be great. This may eventually end up on a site run on one of these frameworks.
thanks!!
I'm not really sure what you're asking for, but here is a list of Joomla extensions that handle RSS syndication:
link text
This seems like a pretty specific application to get started with a big framework. Anyway, some Drupal modules worth checking out:
http://drupal.org/project/facebook_link
http://drupal.org/project/views
http://drupal.org/project/views_rss