Tagged: wordpress move Toggle Comment Threads | Keyboard Shortcuts

  • Mert Yazıcıoğlu 10:53 pm on June 24, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 8

    As you know, last week’s task was writing tools for uploading files to the new server. After some discussions with both of my mentors, we decided WP Filesystem has everything I will need so we closed that task.

    Also, during the same discussion, they told me to make sure the whole process is secure enough. We came up with several different methods but have not made the decision yet, so we are still open to new ideas as I stated on the blog post I requested feedback.

    This week, I will be working on writing importing routines that will take place on the new server. So far, I have created the base of the plugin, so what I will do is basically putting together functions to build the whole importing process. As a side note, I completed the URL changing procedure completely, including the user interface and it is working like a charm. I also created the settings page and everything else the plugin needs in order to run.

    To conclude, tasks become a lot more fun starting this week as I will be releasing the first installable form of the plugin on Tuesday as the outcome of this week’s task.

    That is all for this post, see you next week!

  • Mert Yazıcıoğlu 11:01 pm on June 21, 2011 Permalink | Reply
    Tags: wordpress move   

    WordPress Move – Requesting Feedback 

    Hi everyone!

    I am writing this because we decided that we should consider others’ opinions as well since what I want your opinion about is security-related.

    So basically, my plugin will be uploading archived files to the new server the user wants to migrate to. To reduce the amount of abuse, we can use different types of security measures. The best way I can think of is the method written below. It prevents uploading files right at the beginning and uses a passcode defined by the user which should be set the same in both installations.

    My Method: The current installation passes hashed form of the passcode to the remote file authorize.php which compares it with the passcode stored on the new installation. If they match, it gives writing permission to the directory called backup which contains archived files that are going to be processed during the importing process. When the upload completes, the current installation passes the hashed form of the passcode again but this time to return directory permissions back to normal again.

    If you have any idea how I can develop it even further or if you have an even better idea, please share it. All kinds of feedback is much appreciated!

    Thanks in advance…

    • Mert Yazıcıoğlu 11:14 pm on June 21, 2011 Permalink | Reply

      So here is an idea from my mentor, Pete:

      The current installation archives and stores files. The new installation requests authorizing right before the importing process starts and if authorizing succeeds, it uses WordPress’ HTTP libraries to download archives and starts processing them.

      This sounds a lot better in every aspect to me.

  • Mert Yazıcıoğlu 9:56 pm on June 17, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 7

    This week’s task is writing tools for uploading archives to the new server. Therefore I have been checking out WP Filesystem classes as they will handle almost everything related to uploading. As I said, almost everything is already written by the WordPress developers so I just need to figure out what I may need in addition to them. So far, I could not find anything where writing a function would be necessary. Of course, this task may end without writing any functions if I and my mentor don’t feel the need of writing any extra functions.

    Also, this week I took time to completely reorganize my physical workspace for the upcoming slightly more challenging tasks. I’m also setting up 2 servers in my room to better test the plugin when it’s complete.

    That’s all for this week. I would be more than happy if you could point out where I may need additional functions.

    See you next week!

  • Mert Yazıcıoğlu 11:39 pm on June 10, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 6

    This week, I worked on writing tools for archiving files using PclZip. So far it consists of 6 functions:

    • createArchive( $directory ) : Creates an archive of the given directory.
    • createArchiveAdvanced( $array ) : Creates an archive of the given files.
    • extractArchive( $filename, $destination ) : Extracts the given archive to the given destination.
    • calculateTotalUsage( $directory ) : Calculates the total disk space the given directory uses.
    • listAllFiles( $directory ) : Creates a list of all the files under the given directory.
    • divideIntoChunks( $directory, $chunk_size ) : Creates lists of files (a 2 dimensional array) by dividing files inside a directory into chunks.
    I think functions are pretty clear and they do not need any further explanation but of course, I would love to answer your questions, if you have any.

    This task is almost complete but I need to make sure I did not forget anything before closing the ticket related to the task. I will commit the file to the repo and close the ticket tomorrow.

    Next week, I will be working on writing tools for uploading files to the new server.

    See you next week!
    • Andrew Nacin 11:44 pm on June 10, 2011 Permalink | Reply

      Hey Mert,
      You should check out the WordPress coding standards – http://codex.wordpress.org/WordPress_Coding_Standards. Note how we name functions and methods.

      Also, we already have the ability to extract files in core (it uses ZipArchive then falls back to PclZip), so you won’t need your own extractArchive method.

      I didn’t check if these were methods or functions, but if they’re functions, please prefix them.

      • Mert Yazıcıoğlu 12:31 pm on June 11, 2011 Permalink | Reply

        In fact, the actual code has function names with underscores. I was about to sleep while writing this post, so my fingers just typed them in the way they got used to I think (:

        You are right, I just wrote it to keep everything related to archiving together but since there’s a more advanced built-in one, I should stick with what is in the core.

        They are functions, so I guess I should prefix them with “wpmove_”. Is that okay?

        Thank you very much for your comment, much appreciated!

  • Mert Yazıcıoğlu 9:26 pm on June 3, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 5

    After spending the last Friday night at the emergency service, I decided to give a little break as I am already ahead of schedule (thankfully!). After resting for a few days, I created tickets for the rest of the tasks as I promised last week. Then, I started working on my next task which is writing tools that are going to be used to backup files. First, I looked for libraries that I can use to archive files and soon I decided that using PclZip is the best way to go. After writing a few simple functions that will streamline some processes (creating and extracting archives) using PclZip, I thought WordPress must have needed archiving somewhere so they must already have a library included. A few seconds later, to my surprise, I realized that WordPress too chose PclZip which is great. Anyway, this task is not completed yet as I need to consider every case and write every single function I may need.

    Also, I started creating the plugin but since there is not much to see, I am not committing it to the repository for now.

    That’s all, see you next week!

  • Mert Yazıcıoğlu 2:31 pm on May 27, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 4

    On Wednesday, I had my last final exam which means GSoC is now my full-time job. I decided to complete as many tasks as I can to leave more time for bigger tasks, so I completed my first two tasks in my schedule:

    After a little planning on paper to see what I will need during the creation of the plugin, I realized that for the first task I only needed to write 4 functions:
    • Function to create the database backup
    • Function to remove the database backup
    • Function to list database backup files
    • Function to download the database backup
    These were quite easy, so I wrote and committed them right away.

    Then, I moved onto the second task which required creation of a database backup with URL replacements made. At first, I thought this was going to be rather complicated but soon I realized that writing a function to make replacements in serialized strings and slightly modifying the function that creates the database backup would be enough. So I did that and modified create_database_backup() to take two parameters: old URL and the new URL. Therefore if you pass those parameters, it creates a database backup with replacements made on the fly but if you don’t, it will just backup the current database as is.

    You can find the outcome of those two tasks in libs/functions-database-backup.php under my repository.

    In the following days, I will create tickets for the rest of the tasks and move onto the next task on my schedule:

    • June 14th – Tool to archive files should be written by now.
    I am currently 11 days ahead of my schedule as I planned, so it is good to know that time will not be an issue to worry about.

    That’s all, see you next week!
    • alex 8:10 pm on May 28, 2011 Permalink | Reply

      It is preferable to write the backup file in small chunks to reduce the memory footprint.

  • Mert Yazıcıoğlu 6:59 pm on May 20, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 3

    I had my final exams this week, so I only had chance to study core classes and functions I will use, like WPDB and WP_Filesystem. I tested WPDB functions to see which returns what and how, as I will be using it for my first task: writing the database backing up tool. Also, to avoid further confusions, I should note that when I use the word “tool”, I am referring the code, not the whole user interface. So a working user interface (and plugin, of course) will not be available until all the necessary tools are written. And as I stated on my schedule, UI will reach its final state by July 4th. Just wanted to make it clear.

    Anyway, as my exams are over, now I can completely focus on the project. See you next week!

  • Mert Yazıcıoğlu 8:45 pm on May 13, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 2

    This week, we had an IRC meeting where people pointed out pretty good points. One of them was regarding whether a standalone script is actually needed or not. I always thought the script would make the process easier as it would download and install WP but they also noted that WP is already easy to install and writing a script to download and extract WP is not needed at all. Even though I disagreed with them at the first place, after giving it a thought I realized they are right. Therefore, I am going to make a rather big change in my plans and instead developing a standalone script, I will make plugin able to both send and receive backups. Tomorrow, I will update my schedule and project details to reflect the changes. I really appreciate everyone who pointed that out, including my mentor, you saved me from doing a lot of unnecessary work 🙂

    Also, I created a topic on the forum at WordPress.org to get users’ suggestions and opinions but did not get a reply there, so I guess I should check out other WP communities on the Internet, as well.

    Update: You can now see the updated schedule on the project page.

  • Mert Yazıcıoğlu 3:04 pm on May 6, 2011 Permalink | Reply
    Tags: , wordpress move   

    WordPress Move – Weekly Update 1

    Last night I had the chance to discuss my proposal with Pete Mall, my mentor. He realized that I put an unnecessary step for basic migration option which was installing WordPress first and then replacing the database. So we decided that the script should download & extract WP to the new server, create the config file, replace the database and copy .htaccess files to the new server (which is also another point I never thought of). I also decided to copy the wp-content folder as well by default in the basic migration option. The user will be able to choose not to copy wp-content folder by unchecking the related checkbox as he/she may either not have any or prefer not to copy themes, plugins or uploaded files.

    At our previous conversation, Pete suggested me to have a look at WP_Filesystem and various migration plugins written for WordPress. Those migration scripts he suggested does have nice features I should consider adding so I will keep them in my mind during the development process. Also, we decided using WP_Filesystem would be more beneficial as the WordPress is already using it for upgrades. Therefore it will not only save me from writing a complete library for FTP connections, but also provide a more secure way to transfer the files. So, WP_Filesystem will make WordPress Move a more native plugin for WordPress.

    Along with these, I am currently trying to get familiar with the core of the WordPress to see which functions I can make use of. I will also try to prepare a flowchart of the plugin in the upcoming weeks. Next week, I will post the details of my project to various WordPress discussion boards to learn other users’ needs and suggestions. After the next week, I will be more active as I will not have any classes after May 13th.

  • Mert Yazıcıoğlu 7:27 pm on April 27, 2011 Permalink | Reply
    Tags: , wordpress move   

    Hello everyone I’m Mert Yazicioglu from Ankara Turkey… 

    Hello everyone, I’m Mert Yazicioglu from Ankara, Turkey (UTC +03:00). I am 19 years old and studying Computer Technology and Information Systems at Bilkent University for a B.S. degree. Even though this was my first year at the university, I’ve been into programming since I was 8 and web programming since I was 12. For the last two years, I have been developing my own framework and some applications working on it (CMS etc.). However, recently I realized it has some weak points that should be taken care of, so its development is kind of on hold at the moment.

    I always admired WordPress’ success but never had a chance to do something useful to the community. Thankfully, I now have the chance to contribute to it with a pretty useful and necessary project, in my opinion. My project is called WordPress Move, which will be a straightforward but also a feature-rich project that fits every kinds of installations just fine and makes the whole migration process a piece of cake for everyone. It will only require installing a plugin on the current WordPress installation and providing some necessary information (FTP details etc.). This tool will help the user migrate to another server or change the domain name of the current installation easily. You can find my full proposal here.

    You can add me as a friend on Facebook, follow me on Twitter or email me. I’m glad to be a part of a great project and can’t wait to start developing for this huge community!

    Congratulations everyone!

    • Ünsal Korkmaz 8:25 pm on April 27, 2011 Permalink | Reply

      Off-topic: I am so proud of you m8. Keep it up 🙂

    • Pete Mall 9:00 pm on April 27, 2011 Permalink | Reply

      Looking forward to working with you over the summer. Good luck!

    • Justin Shreve 11:26 pm on April 27, 2011 Permalink | Reply

      Congrats and good luck! Being able to change the domain easily is a good feature and making moving 1click/simple will be awesome.

    • brianlayman 12:46 am on April 28, 2011 Permalink | Reply

      Congrats Mert! This project is going to be one of the most helpful WordPress GSOC projects there’s been. I look forward to helping you and Pete make it a success!

    • Russell 6:25 am on April 28, 2011 Permalink | Reply

      Totally looking forward to this! GO GO GO!

    • athalyba 3:17 am on April 30, 2011 Permalink | Reply

      Amazing idea !!! When the plugin be ready, you must know that for a couple of days you´ll have a couch and meals in São Paulo/Brazil waiting for you 🙂

      And about syncronization between two servers/domains, it could be a good extra feature ???

      Congratulations again !!!

      • Mert Yazıcıoğlu 10:02 am on April 30, 2011 Permalink | Reply

        Haha, thanks! 🙂

        Even though it is a great idea, continuous synchronization would be a rather complicated task to be an extra feature. I guess I can start developing “WordPress Sync” after GSoC’11 completes 🙂

    • Deepak 3:56 am on April 30, 2011 Permalink | Reply

      Good Luck :). I applied for the same project but didn’t get in, I hope you make it a success unlike last year.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc