Exporting site to WordPress

user7085085

I've created a site over the last few months, and now I should upload it to a WordPress server.

On my own server, without WordPress, just PHP and ApacheWordPress2, everything works just fine. PHP includes include the CSS content as asked from root as a style.css.

I have all my CSS loaded in <?php include 'include/head.php';?>.

Part of the head.php file:

<link rel="stylesheet" href="css/bootstrap.min.css"/>
<link rel="stylesheet" href="css/normalize.min.css"/>
<link rel="stylesheet" type="text/css" href="js/vendor/slick/slick.css"/>

1

But when I upload the site into project/wp-content/themes/project. suddenly any of the resources won't load.

Everything from JavaScript scripts in /js folders, images in /img and extra CSS in the /css folder or even the style.css in root won't load. It's all just 404 on the inspectors network tab.

I've included the header part in style.css as requested by WordPress, but should I do something more?

The Inspector tab seems to indicate that it's trying to load from correct path, but it still gives 404.

My folder structure is following:

Inside wp-content/themes/project

pages.php(20 of them, also index.php)
style.css - basic css for site layout
css/ *more css files*
img/ *image files*
include/ *PHP includes*
js/ *js action for site*

Octal for theme/project permission is: 2755

I hope this post makes any sense.

figuitiko

You should enqueue your style like this in your function.php:

<?php add_action('wp_enqueue_scripts', array($this, 'enqueue_styles'));}

public function enqueue_styles() {
    wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css'); false);
}?>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Exporting Ghost to Wordpress

From Dev

WordPress not exporting or importing featured image

From Dev

Display Wordpress Site Title

From Dev

WordPress site redirect permalinks

From Dev

Logging in to the copy of the WordPress site

From Dev

Sitemap - Wordpress site on subdomain

From Dev

How to ssh to a wordpress site

From Dev

AngularJS Routing in a Wordpress site

From Dev

Wordpress site backdoor - hack

From Dev

uploading fonts to wordpress site

From Dev

As an authorized user on a site with Wordpress?

From Dev

Mobile Version of a Wordpress Site

From Dev

JQuery Not Loading on Wordpress Site

From Dev

Mirroring a WordPress site with wget

From Dev

Attacked site WordPress

From Dev

Redirect wordpress site to homepage

From Dev

Recover wordpress site

From Dev

Wordpress site within subdomain

From Dev

WordPress Shortcode Crashes Site

From Dev

Text overflowing in site wordpress

From Dev

customizing an attribute in wordpress site

From Dev

Implementing Autocomplete on a Wordpress site

From Dev

Wordpress Fullscreen site

From Dev

Exporting the database of Microsoft Azure wordpress web app

From Dev

Wordpress: Advanced Custom Fields: Exporting and Importing fields to a new wordpress install

From Dev

Wordpress: Advanced Custom Fields: Exporting and Importing fields to a new wordpress install

From Dev

Changing the site URL broke my Wordpress site

From Dev

Sitecore: exporting all items of a given template everywhere on the site

From Dev

Importing/exporting methods not being called on custom site settings part