I use wordpress in a lan with wamp. I can correctly see the lan from client pcs. It works perfectly with non wordpress websites so i don't think it's a lan setting problem. Is there any particular setting i should set in wordpress? Actually, it loads correctly, but without JS and CSS.

UPDATE, here's how CSS and JS are loaded in the plugin:

function agenda_my_scripts() {
if ( !is_admin() ) {
    // datepicker
    wp_enqueue_script( 'custom-datepicker', plugins_url( 'sys/js/datepicker.js', dirname(__FILE__) ), array('jquery') );
    // CSS
    wp_register_style( 'agenda_css', plugins_url( 'sys/css/style.css', dirname(__FILE__) ) );
    wp_enqueue_style( 'agenda_css' );
    // jQuery CSS
    wp_register_style( 'jquery_ui_css', plugins_url( 'sys/css/jquery-ui.css', dirname(__FILE__) ) );
    wp_enqueue_style( 'jquery_ui_css' );

} add_action('wp_enqueue_scripts','agenda_my_scripts');

Then the child theme have the classic configuration:

Theme Name:   Theme name
Theme URI:    -
Description:  Description
Author:       Author
Author URI:   -
Template:     child_template
Version:      1.0
Tags:         -
Text Domain:  child_template

@import url("../twentytwelve/style.css");

where 'template' and 'text domain' match folder's name.

Moreover, if i activate the child theme, it loads twentyfourteen!!

This is very weird...

  • It's obvious. You don't have the CSS/JS LAN - development kit - plugin for Wordpress;-) No just kidding. A guess would be that it is htacess-related or it's that simple that it points to incorrect css/js - file. – bestprogrammerintheworld Mar 21 '14 at 10:51
  • Locally it loads CSS/JS correctly, only via lan i get the problem... What about your "htacess-related" guess? – Mariano Mar 21 '14 at 14:57
  • Please show use how you load the js/css files in the header (in the WP-installation) and where the the actual js/css files is. – bestprogrammerintheworld Mar 22 '14 at 7:02
  • i've updated the code with the original question... – Mariano Mar 22 '14 at 8:44
  • ok i solved it, or better: i solved the css/js issue but the child theme is still looking for twentyfourteen instead of twentytwelve...i'll post the solution to the main problem below – Mariano Mar 22 '14 at 9:40

finally i solved it...this was a very annoying problem! just enter your db and change in wp_option: - siteurl: from localhost server's lan ip - home: from localhost server's lan ip

that's it! :)

| improve this answer | |
  • 1
    Please explain your solution better, so other readers can understand and reproduce it. – fuxia Mar 22 '14 at 9:58
  • how can i explain better than this? 1) access your db (ex. with phpmyadmin); 2) in table wp_option search for value 'siteurl' and change it from 'localhost' to your machine external ip (i can't know what is the ip); 3) do the same with the value 'home'. I don't know what else to say about this... – Mariano Mar 22 '14 at 10:13
  • 1
    Your comment is better already than your answer text. :) An explanation how that changes the way WordPress behaves would be useful too. – fuxia Mar 22 '14 at 10:17
  • What happens when you change it to instead of your external ip? Also you can change this in the WP settings, no need to enter the database. – Jeffrey von Grumbkow Jun 9 '16 at 12:30
  • Yes, you can do this change via WordPress/Settings/General, however, throughout your content or theme, if you have any links containing "localhost" (for whatever reason) then you have to go through a process to change them. That process could be manually changing them in the database or in your code files. – MarsAndBack Jan 7 '19 at 17:29

Just run this query in your sql console:

update wp_options
set option_value = '/'
WHERE option_name = 'home'
   OR option_name = 'siteurl'
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.