• Resolved martonic

    (@martonic)


    Help please – our installation is confused about where to update its plugins.

    We first installed WordPress in a subdirectory and then we moved it to the root by following the instructions here

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site

    (and we ran the search and replace php script).

    So now, the plugins our installation uses are in the directory

    www/wp-content/plugins

    and those plugins work fine. If we manually upload a plugin to that directory, WordPress detects it, we can activate it, and it works normally.

    However, when it comes time to update, delete, or automatically install a plugin, our installation operates on the old directory:

    www/wp/wp-content/plugins

    I would like to fix this.

    Can anyone tell me where, in the database, is the information that tells WordPress where to operate on the installed plugins? This seems to be different than the information that tells it from where to LOAD the installed plugins. I would call this a BUG – but meanwhile, would like to find a way to correct this problem.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Lindsay T

    (@froginapuddle)

    Perhaps check your wp-config.php

    Did you happen to have previously defined your plugins folder?

    http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

    Thread Starter martonic

    (@martonic)

    Thank you very much!

    Thread Starter martonic

    (@martonic)

    Unfortunately, changing wp-config.php did not seem to help.

    For example, wp-config.php has this:

    define( ‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content’ );
    define( ‘WP_CONTENT_URL’, ‘http://sitename.com/wp-content’);

    (the text is not “sitename”, it is the actually web site name)

    I log into dashboard and it says I need to update two themes (twenty-ten and twenty-eleven).

    If I update them, it changes the content HERE:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp/wp-content/themes’

    NOT here:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/themes’

    It says both updates are successful BUT as soon as I click “Dashboard”, it STILL says that two themes need to be updated.

    WordPress is READING our content from the correct location, but WRITING it to the wrong location!

    Any help will be appreciated enormously!

    Try commenting out those two lines in wp-config.php

    Thread Starter martonic

    (@martonic)

    Example 2. I install a plugin and it lands here:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp/wp-content/plugins’

    and I go to the plugins page and it is NOT THERE.

    I manually MOVE the new directory into this location:

    $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/plugins’

    and THEN WordPress agrees that we have a new plugin installed.

    Any ideas?

    Thread Starter martonic

    (@martonic)

    esmi wrote:

    Try commenting out those two lines in wp-config.php

    Thanks esmi but it makes no difference. It worked that way BEFORE I added those lines to wp-config.php, and it still works the same crazy way AFTER I added them in. I then went to the Settings page and clicked ‘Submit’ (without changing anything) but that made no difference either.

    When you moved this site, did you carry out a full search & replace of all urls in the database?

    Thread Starter martonic

    (@martonic)

    I ran the “search and replace php script” but I cannot be 100% sure that it worked correctly. However, the site does run at its new location and WP READS the plugins, themes and so on from the correct location, it just continues to WRITE them (including updates) to the wrong one.

    Hence my original question in the first post above:

    Can anyone tell me where, in the database, is the information that tells WordPress where to operate on the installed plugins? This seems to be different than the information that tells it from where to LOAD the installed plugins. I would call this a BUG – but meanwhile, would like to find a way to correct this problem.

    I’d suggest looking in the wp_options table. As far as I can recall, the data should not be serialized.

    Thread Starter martonic

    (@martonic)

    Thanks.

    I only found one entry with the string ‘/wp/’ in the option_value field.

    The option_name is “recently_edited” and the length of each sub-string (a total of five “s:xxx” values) is embedded in the data (error-prone for manual editing).

    It does not seem like the “recently_edited” row should be causing these problems. But then again, I don’t understand why “recently_edited” would be considered an “option” in the first place. I surely don’t know what effect this entry is supposed to have on the site behavior.

    That’s nothing to do with your plugins folder. Can you go through exactly what steps you used to move this site?

    Thread Starter martonic

    (@martonic)

    1) Administration > Settings > General panel.

    2) Changed WordPress Address and Site Address from http://wp/sitename.com to http://sitename.com.

    3) Clicked “Save Changes”.

    4) Copied wp-admin, wp-content, wp-includes directories from public-html/wp to public-html.

    5) Copied .htaccess, index.php, xmlrpc.php, and all of the wp-*.php files from public-html/wp to public-html.

    6) Edited index.php (in the root directory). Changed “require(‘./wp/wp-blog-header.php’);” to “require(‘./wp-blog-header.php’);”.

    7) Ran the “Search and Replace for WordPress Databases Script” from here:

    http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Changed all matching references from “sitename/wp/” to “sitename/”.

    8) Opened the admin site which was a bit tricky. I don’t recall how I finally got into the site at this point.

    9) Administration > Settings > Permalinks

    10) Clicked “Save Changes”. The contents of sitename/.htaccess did not need to be changed; it already matched what was shown. It has the permalink code and nothing else.

    I think that’s it.

    So you didn’t follow the instructions in this Codex section?

    Thread Starter martonic

    (@martonic)

    That is exactly what I followed, or tried to follow, as well as I could understand it.

    Can you point to something I did wrong?

    4) Copied wp-admin, wp-content, wp-includes directories from public-html/wp to public-html.

    Why did you copy and not move?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Installation confused about plugin location’ is closed to new replies.