• Hello! I need help with the transferring php files into wordpress. I have already imported mysql database to new wordpress template. But we need to keep same functions from the older site, but I don’t know how to transfer the php files into wordpress. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You most likely won’t be able to “transfer” the PHP files from the old site to a new WordPress site. You’ll need to look into how to make these functions available through the WordPress system.

    The most common ways are by introducing filters, actions, shortcodes, custom templates and possibly even widgets.

    How you do this for each function depends on how it needs to be used, so there’s no one overall way to do everything. It will take a bit of time to learn, but the learning curve isn’t as steep as a few other CMS’s out there that I’ve worked with.

    And of course, we’re always here on the forums to try and help out if you get stuck on something!

    Thread Starter bahrui5912

    (@bahrui5912)

    Hello! How are you? Thanks for the reply! I have been working on wordpress for a year, so that I agree that there are a lot tutorials and wordpress forums for assistance. we want to keep the same functionality from the old site, and we really be doing a face lift operation. We just added a wordpress template, and links will be the same as the old one.

    Thread Starter bahrui5912

    (@bahrui5912)

    There is one question that I have. I will be copying javascript ans some php files to the wordpress template, from the older website. Could you please tell me, what would be better? short code or widget? Thanks!

    Thread Starter bahrui5912

    (@bahrui5912)

    what I want to do is: I want to connect the database tables that I imported to wordpress template’s database with the associated pages. older website has javascript and php pages. What would be the best plugin or way to do it? Thanks!

    Could you please tell me, what would be better? short code or widget?

    That depends on how the code will be used. If it’s going to be part of the pages content, then it should be a shortcode. If it’s going to be in a sidebar somewhere, then it needs to be a widget.

    As far as importing the existing site, there’s most likely not going to be a ready-made tool that can do that unless you’re using an existing CMS system that has a migration tool. Anything in JavaScript can be set up using the wp_enqueue_script() function, and PHP coe can be added through the various methods that I talked about above. As far as acutal content, depending on how much there is it might be eaiser ot do it manually, or if there’s a lot you could write a transfer/migration script that will copy it all over ofr you.

    Thread Starter bahrui5912

    (@bahrui5912)

    Thanks! There is also a plugin that could work I think, which is CSS & Javascript Toolbox.
    https://css-javascript-toolbox.com/
    Or do you prefer wp_enqueue_script()?
    Thanks!

    I’d use wp_enqueue_script() and save the money for that. There’s no reason whatsoever to pay for a 3rd party tool to do that when it’s all built in already.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘importing php files from custom built php site new wordpress template’ is closed to new replies.